xanderashwell (@xanderashwell)

Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • In reply to: PHP if/else arguments

    xanderashwell
    Member

    @xanderashwell

    Hi Olaf,

    Thanks for pointing me in the right direction!

    Thanks also for your plugin solution for changing user’s information fields, I actually found the solution on the finalwebsites’ forums, but re-posted your fix in the forum here: https://bbpress.org/forums/topic/change-profile-information

    You’re a life-saving bbpress & php wizard, and you deserve a shiny gold star for your good work.


    xanderashwell
    Member

    @xanderashwell

    If anyone is still looking for the solution to this, there is a suitable fix (creating a plugin to do the heavy lifting)

    here

    Basically, create a new plugin by saving the following code as “my-plugin.php” or whatever you might like to call it, in the my-plugins folder:

    <?php

    /*

    Plugin Name: Profile Details

    Plugin URI: https://bbpress.org/

    Description: This plugin adjusts the information required at registration, and which information is displayed on the profile page.

    Author: A.Example

    Version: 0.333

    Author URI: https://bbpress.org/

    */

    function set_my_profile_info_keys($myarray) {

    $myarray = array(

    //’first_name’ => array(0, __(‘First name’)),

    //’last_name’ => array(0, __(‘Last name’)),

    ‘display_name’ => array(1, __(‘Display name as’)),

    ‘user_email’ => array(1, __(‘Email’)),

    //’user_url’ => array(0, __(‘Website’)),

    //’from’ => array(0, __(‘Location’)),

    //’occ’ => array(0, __(‘Occupation’)),

    //’interest’ => array(0, __(‘Interests’))

    );

    return $myarray;

    }

    add_filter(‘get_profile_info_keys’, ‘set_my_profile_info_keys’);

    ?>

    I hope that helps someone out, full credit must go to Olaf for this fix.

    Namasté,

    Xander

Viewing 2 replies - 1 through 2 (of 2 total)