Skip to content

Commit

Permalink
Fix #277
Browse files Browse the repository at this point in the history
Fix #277
  • Loading branch information
GaneshKandu authored and lGuillaume124 committed Jul 14, 2017
1 parent 33b2748 commit 97305cf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/Model/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ public function beforeValidate($options = array()) {
}

public function isThereAnAdmin() {
if($this->data[$this->alias]['id']){
if(isset($this->data[$this->alias]['id'])){
if (AuthComponent::user('id') == $this->data[$this->alias]['id'] && isset($this->data[$this->alias]['role'])) {

Expand All @@ -159,6 +160,7 @@ public function isThereAnAdmin() {
}
}
}
}
return true;
}

Expand Down

0 comments on commit 97305cf

Please sign in to comment.