Change display order of Lastname, Firstname

Backend functionalities: user management, course management, reports, certificates, etc.
Post Reply
docebogal
FormaLms User
Posts: 55
Joined: Thu Nov 08, 2012 11:58 pm

Change display order of Lastname, Firstname

Post 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

???

User avatar
max
FormaLms Guru
Posts: 2640
Joined: Thu Mar 01, 2012 10:41 am
Version: forma.lms 2.4
Contact:

Re: Change display order of Lastname, Firstname

Post 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.
---------------------
Massimiliano Ferrari
Elearnit - Elearning e Knowledge Management
https://www.elearnit.net
https://www.linkedin.com/in/massimilianoferrari
m.ferrari[at]elearnit.net
Skype: m_ferrari_it

rsaucier
Newbie
Posts: 15
Joined: Thu Jul 12, 2012 9:31 pm

Re: Change display order of Lastname, Firstname

Post 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! :)

User avatar
max
FormaLms Guru
Posts: 2640
Joined: Thu Mar 01, 2012 10:41 am
Version: forma.lms 2.4
Contact:

Re: Change display order of Lastname, Firstname

Post by max »

rsaucier, thanks for posting this!
(I am no programmer, so I wouldn't know how to code it... ;-) )
---------------------
Massimiliano Ferrari
Elearnit - Elearning e Knowledge Management
https://www.elearnit.net
https://www.linkedin.com/in/massimilianoferrari
m.ferrari[at]elearnit.net
Skype: m_ferrari_it

aedwards865
Newbie
Posts: 12
Joined: Mon Jul 02, 2012 2:48 am

Re: Change display order of Lastname, Firstname

Post by aedwards865 »

Thank you! I've wondered how to do that for a while.

docebogal
FormaLms User
Posts: 55
Joined: Thu Nov 08, 2012 11:58 pm

Re: Change display order of Lastname, Firstname

Post by docebogal »

Thanks so much.

User avatar
murat
FormaLms User
Posts: 114
Joined: Fri Oct 12, 2012 6:28 pm
Version: forma.lms 2.0

Re: Change display order of Lastname, Firstname

Post by murat »

I've tried it. the result was successful :)

Thank you ;)
Hello,I'm Murat. If you need me, you can contact my mail

Post Reply