Skip to content

Update another table during registration, register event #472

Answered by MGatner
mauriceb77 asked this question in Q&A
Discussion options

You must be logged in to vote

In addition to @datamweb's suggestion the piece you might be missing is that the new user is passed into the Register event as a parameter, so when you set up your listener it can receive the object:

Events::on('register', static function ($user) {
    echo $user->id;
});

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by mauriceb77
Comment options

You must be logged in to vote
1 reply
@mauriceb77
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants