From 1ae38f7f50a31502909c91826488e6181ce07beb Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Tue, 6 Sep 2016 01:05:38 +0200 Subject: Added isadmin to users --- app/User.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'app') 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; -- cgit v1.2.3