diff --git a/app/Models/User.php b/app/Models/User.php index c13a9d133..384e06059 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -146,4 +146,13 @@ class User extends Model implements AuthenticatableContract, AuthorizableContrac { $this->notify(new ResetPasswordNotification($token)); } + + /** + * Return true or false depending on wether the user is root admin or not. + * + * @return boolean the user is root admin + */ + public function isRootAdmin() { + return $this->root_admin === 1; + } }