diff options
Diffstat (limited to 'app/User.php')
-rw-r--r-- | app/User.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/User.php b/app/User.php index dda14ca..f1ff869 100644 --- a/app/User.php +++ b/app/User.php @@ -26,7 +26,7 @@ class User extends Model implements Authenticatable { protected $table = 'users'; public $timestamps = false; - protected $fillable = ['email', 'name']; + protected $fillable = ['email', 'name', 'isadmin']; const VOTE_WEIGHT_BASE = 5; @@ -43,6 +43,9 @@ class User extends Model implements Authenticatable { } public function voteWeight() { + if ($this->isadmin) + return Verb::ACCEPTED_VOTE_COUNT; + if ($this->points <= 0) return 0; |