aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorCamil Staps2016-09-06 01:05:38 +0200
committerCamil Staps2016-09-06 01:05:38 +0200
commit1ae38f7f50a31502909c91826488e6181ce07beb (patch)
tree12f70398cb82e95dab956a5279346163b359aa68 /app
parentClearer training page (diff)
Added isadmin to users
Diffstat (limited to 'app')
-rw-r--r--app/User.php5
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;