Monday 29 June 2015

Customising PHPBB 3.1 to do display user specified names

I eventually managed to find a way to easily modify the display names, so I created a quick page to explain the process. Click Here

2 comments:

  1. // replace username with custom field displayname START
    if(!empty($user_id))
    {
    $cp = $phpbb_container->get('profilefields.manager');
    $userProfileFields = $cp->grab_profile_fields_data($user_id);

    if(!empty($userProfileFields[$user_id]["displayname"]["value"]))
    {
    $username = $userProfileFields[$user_id]["displayname"]["value"];
    }
    else
    {
    $username = getldapname($username);
    if (!empty($username)) {
    $cp_data = array('pf_displayname' => $username);
    $cp->update_profile_field_data($user_id, $cp_data);
    }
    }
    }
    // replace username with custom field displayname END

    ReplyDelete
  2. helow i have phpBB3.2 i use ldap unth and Change Display Name insted of username
    my email: skyforce_2030@hotmail.com

    ReplyDelete