Update migrations and User model

This commit is contained in:
DariusIII
2018-01-22 12:36:51 +01:00
parent 07b683bbba
commit 2b2cb4a462
7 changed files with 11 additions and 244 deletions
+7 -1
View File
@@ -755,6 +755,12 @@ class User extends Authenticatable
return false;
}
if (NN_INSTALLER === true) {
$storeips = '';
} else {
$storeips = (int) Settings::settingValue('..storeuserips') === 1 ? $host : '';
}
return self::query()->insertGetId(
[
'username' => $userName,
@@ -762,7 +768,7 @@ class User extends Authenticatable
'email' => $email,
'user_roles_id' => $role,
'created_at' => Carbon::now(),
'host' => (int) Settings::settingValue('..storeuserips') === 1 ? $host : '',
'host' => $storeips,
'rsstoken' => md5(Password::getRepository()->createNewToken()),
'invites' => $invites,
'invitedby' => (int) $invitedBy === 0 ? 'NULL' : $invitedBy,