Currently logged in as First Name

Permalink Browser Info Environment
I am using your login addon for a membership site that is not capturing a username with login, but using the email address. As such, I would like to present the user's first name instead of their username for:

Currently logged in as...

I tried editing the view.php file lone 12 from:

$userName = $u->getUserName();


to

$userName = $ui->getAttribute('first_name_reg');


but wasn't so lucky.

I am a novice at C5 and PHP, but have made a number of complex modifications to my site and addons so far. Wondering if you are open to pointing me in the right direction.

Thanks.

Type: Discussion
Status: New
uswebdesigner
View Replies:
c5studio replied on at Permalink Reply
c5studio
You're on the right track, its just not working because the $ui variable hasn't been declared yet. If you add the following line before that line it should work:
$ui = UserInfo::getByID($u->getUserID());
uswebdesigner replied on at Permalink Reply
uswebdesigner
Perfect. Thanks.

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.