Page 1 of 1

Change display order of Lastname, Firstname

Posted: Mon Nov 12, 2012 7:14 am
by docebogal
When a user logs in to docebo, they see name displayed in the upper right hand corner in the format:
Welcome!, Lastname Firstname.

How can it be changed to:
Welcome!, Firstname Lastname

???

Re: Change display order of Lastname, Firstname

Posted: Mon Nov 12, 2012 9:27 am
by max
Hi,
it is not possible with the built-in functionalities. If you want to achieve that, you have to work on a html basis.

Re: Change display order of Lastname, Firstname

Posted: Mon Nov 12, 2012 6:27 pm
by rsaucier
To change this, edit the /lib/lib.user.php file (after making a backup copy!).

Search for getUserName then edit to look like this:

Code: Select all

public function getUserName() {
    $user_info = $this->aclManager->getUser(getLogUserId(), false);
    return ( $user_info[ACL_INFO_FIRSTNAME].$user_info[ACL_INFO_LASTNAME]
        ? $user_info[ACL_INFO_FIRSTNAME].' '.$user_info[ACL_INFO_LASTNAME]
       : $this->aclManager->relativeId($user_info[ACL_INFO_USERID]) );
}
Again, always back up a file before editing! :)

Re: Change display order of Lastname, Firstname

Posted: Mon Nov 12, 2012 6:41 pm
by max
rsaucier, thanks for posting this!
(I am no programmer, so I wouldn't know how to code it... ;-) )

Re: Change display order of Lastname, Firstname

Posted: Mon Nov 12, 2012 9:17 pm
by aedwards865
Thank you! I've wondered how to do that for a while.

Re: Change display order of Lastname, Firstname

Posted: Tue Nov 13, 2012 7:10 am
by docebogal
Thanks so much.

Re: Change display order of Lastname, Firstname

Posted: Tue Nov 13, 2012 4:28 pm
by murat
I've tried it. the result was successful :)

Thank you ;)