1
0
mirror of https://github.com/flarum/core.git synced 2025-08-01 14:10:37 +02:00

Prevent overwriting of user's attributes on register

This commit is contained in:
Davis
2016-09-13 02:22:09 -05:00
committed by GitHub
parent 14ee7614ac
commit b25ca5b508

View File

@@ -115,8 +115,10 @@ class RegisterUserHandler
// from the get-go.
if (isset($token)) {
foreach ($token->payload as $k => $v) {
if ($user->$k == "" || !isset($user->$k)) {
$user->$k = $v;
}
}
if (isset($token->payload['email'])) {
$user->activate();