mirror of
https://github.com/flarum/framework.git
synced 2025-02-02 21:03:00 +08:00
Prevent overwriting of user's attributes on register
This commit is contained in:
parent
14ee7614ac
commit
b25ca5b508
|
@ -115,8 +115,10 @@ class RegisterUserHandler
|
||||||
// from the get-go.
|
// from the get-go.
|
||||||
if (isset($token)) {
|
if (isset($token)) {
|
||||||
foreach ($token->payload as $k => $v) {
|
foreach ($token->payload as $k => $v) {
|
||||||
|
if ($user->$k == "" || !isset($user->$k)) {
|
||||||
$user->$k = $v;
|
$user->$k = $v;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (isset($token->payload['email'])) {
|
if (isset($token->payload['email'])) {
|
||||||
$user->activate();
|
$user->activate();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user