make sure user is always in primary rank
This commit is contained in:
parent
e5197f4092
commit
0a4b9de9d7
1 changed files with 2 additions and 3 deletions
|
@ -295,9 +295,8 @@ class User
|
||||||
$emailClean = clean_string($email, true);
|
$emailClean = clean_string($email, true);
|
||||||
$password = password_hash($password, PASSWORD_BCRYPT);
|
$password = password_hash($password, PASSWORD_BCRYPT);
|
||||||
|
|
||||||
if (!$ranks) {
|
// make sure the user is always in the primary rank
|
||||||
$ranks[] = config('rank.regular');
|
$ranks = array_unique(array_merge($ranks, [intval(config('rank.regular'))]));
|
||||||
}
|
|
||||||
|
|
||||||
$userId = DB::table('users')
|
$userId = DB::table('users')
|
||||||
->insertGetId([
|
->insertGetId([
|
||||||
|
|
Reference in a new issue