diff --git a/app/User.php b/app/User.php index e293673..fdfe096 100644 --- a/app/User.php +++ b/app/User.php @@ -295,9 +295,8 @@ class User $emailClean = clean_string($email, true); $password = password_hash($password, PASSWORD_BCRYPT); - if (!$ranks) { - $ranks[] = config('rank.regular'); - } + // make sure the user is always in the primary rank + $ranks = array_unique(array_merge($ranks, [intval(config('rank.regular'))])); $userId = DB::table('users') ->insertGetId([