I am creating a website, and a new user will have to register to use it. Now, after signing up on the site, I want their first name to appear once logged in. How can I do this?
We've moved the forum!
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
You can access any of the fields of the currently logged in member by using $CurrentMember. To get the first name you can do $CurrentMember.FirstName. To see all the properties you can call on $CurrentMember look at the Member.php class.
Thank you for your help. The information you provided was excellent.
I was wondering how to create a first and last name?
I was wondering how to create a first and last name?
Member has a Name function which returns the full name. $CurrentMember.Name
I want to thank you help. It works. I wouldn't be able to figure it out without your help.