Jump to:

130 Posts in 946 Topics by 55 members

Showcase Questions

SilverStripe Forums » Showcase Questions » Creating a First Name

Feedback and questions about sites in the Community Showcase.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1634 Views
  • Denny
    Avatar
    Community Member
    55 Posts

    Creating a First Name Link to this post

    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?

  • Willr
    Avatar
    Forum Moderator
    5482 Posts

    Re: Creating a First Name Link to this post

    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.

  • Denny
    Avatar
    Community Member
    55 Posts

    Re: Creating a First Name Link to this post

    Thank you for your help. The information you provided was excellent.

  • Denny
    Avatar
    Community Member
    55 Posts

    Re: Creating a First Name Link to this post

    I was wondering how to create a first and last name?

  • Willr
    Avatar
    Forum Moderator
    5482 Posts

    Re: Creating a First Name Link to this post

    I was wondering how to create a first and last name?

    Member has a Name function which returns the full name. $CurrentMember.Name

  • Denny
    Avatar
    Community Member
    55 Posts

    Re: Creating a First Name Link to this post

    I want to thank you help. It works. I wouldn't be able to figure it out without your help.

    1634 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.