Jump to:

3373 Posts in 998 Topics by 712 members

Data Model Questions

SilverStripe Forums » Data Model Questions » Creating a new member

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

Page: 1
Go to End
Author Topic: 274 Views
  • cachobong
    Avatar
    Community Member
    9 Posts

    Creating a new member Link to this post

    Is it possible to create/insert a new member in this manner?

    $o_member = new Member();
                $a_data['Email'] = 'email@email.com';
                $a_data['Password'] = '123456';
                $a_data['FirstName'] = 'My FirstName';
                $o_member->update($a_data);

  • Willr
    Avatar
    Forum Moderator
    5462 Posts

    Re: Creating a new member Link to this post

    Yes. You can even do

    $member = new Member();
    $member->Email = "hi@email.com";
    ..
    $member->write(); // saves to database.

    274 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.