diff --git a/common/models/User.php b/common/models/User.php index 2aacddf..d388f50 100755 --- a/common/models/User.php +++ b/common/models/User.php @@ -226,4 +226,17 @@ { return $this->hasOne(UserPassport::className(), [ 'user_id' => 'id' ]); } + + /** + * @return bool + * @todo change this + */ + public function isAdmin() + { + if ($this->id == 1) { + return true; + } else { + return false; + } + } } -- libgit2 0.21.4