]> BookStack Code Mirror - bookstack/blobdiff - app/Auth/User.php
Split out codemirror JS to its own module
[bookstack] / app / Auth / User.php
index 540a8d7abbe0d5ebd7f49ed34bd8957ec2b93e79..f969b351f4a169bab7144c36a3c05c3a3de6af9b 100644 (file)
@@ -146,7 +146,7 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon
      */
     public function attachDefaultRole(): void
     {
-        $roleId = setting('registration-role');
+        $roleId = intval(setting('registration-role'));
         if ($roleId && $this->roles()->where('id', '=', $roleId)->count() === 0) {
             $this->roles()->attach($roleId);
         }