diff options
author | Camil Staps | 2016-09-06 01:05:38 +0200 |
---|---|---|
committer | Camil Staps | 2016-09-06 01:05:38 +0200 |
commit | 1ae38f7f50a31502909c91826488e6181ce07beb (patch) | |
tree | 12f70398cb82e95dab956a5279346163b359aa68 /app | |
parent | Clearer training page (diff) |
Added isadmin to users
Diffstat (limited to 'app')
-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; |