// 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
helow i have phpBB3.2 i use ldap unth and Change Display Name insted of usernamemy email: skyforce_2030@hotmail.com
// replace username with custom field displayname START
ReplyDeleteif(!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
helow i have phpBB3.2 i use ldap unth and Change Display Name insted of username
ReplyDeletemy email: skyforce_2030@hotmail.com