Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » function to register a new member

Our old forums are still available as a read-only archive.

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

Page: 1
Go to End
Author Topic: 1363 Views
  • bebabeba
    Avatar
    Community Member
    192 Posts

    function to register a new member Link to this post

    Hi!
    I create a section to register user. Who is register can post comment about a particular published book.
    I do my form to register member, I tahe form value and I ceck if in my db user with the same name and password exixts. Now how can do to allow user to post?An remeber that the user is registre?I try look on forum module but something is not clear for me and I can't please help me..

  • g
    Avatar
    Community Member
    22 Posts

    Re: function to register a new member Link to this post

    If you mean login after registering try this:

    $member_login = new MemberLoginForm();

    if($member_login->performLogin($data))
    {
    // Redirect to the post page
    Director::redirect('post-page/');
    }

  • bebabeba
    Avatar
    Community Member
    192 Posts

    Re: function to register a new member Link to this post

    Thanks!
    but I have an other problem. When I try to log a user seems forgot session. so I use:
    $_SESSION["utente"] = $data['nome'];
    $_SESSION["id"] = session_id();
    in login function to remember user session. and I pass this varable in template but something is wrong..

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