mirror of
https://github.com/flarum/framework.git
synced 2024-12-02 23:23:52 +08:00
Merge pull request #1033 from dav-is/patch-2
Prevent Overwriting of User's Attributes on Register (#897)
This commit is contained in:
commit
d5ccc7392a
|
@ -116,7 +116,9 @@ class RegisterUserHandler
|
|||
// from the get-go.
|
||||
if (isset($token)) {
|
||||
foreach ($token->payload as $k => $v) {
|
||||
$user->$k = $v;
|
||||
if ($user->$k === '' || ! isset($user->$k)) {
|
||||
$user->$k = $v;
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($token->payload['email'])) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user