]> git.localhorst.tv Git - alttp.git/blobdiff - app/Models/User.php
add admin subclass
[alttp.git] / app / Models / User.php
index 879624a2072f58186e66ad107a604fd23e9f0d9f..201361e68534eb869f94a1c3e50dc61140552a6b 100644 (file)
@@ -44,6 +44,10 @@ class User extends Authenticatable
                return $this->role === 'admin';
        }
 
+       public function isPrivileged() {
+               return $this->role === 'special' || $this->isAdmin();
+       }
+
        public function isApplicant(Tournament $tournament) {
                foreach ($tournament->applications as $applicant) {
                        if ($applicant->user_id == $this->id) {
@@ -215,7 +219,7 @@ class User extends Authenticatable
                'discriminator' => 'string',
                'email' => 'string',
                'avatar' => 'string',
-               'avatar_cached' => 'boolean',
+               'avatar_cached' => 'datetime',
                'verified' => 'boolean',
                'locale' => 'string',
                'mfa_enabled' => 'boolean',