Skip to content
This repository has been archived by the owner on Sep 10, 2021. It is now read-only.

Commit

Permalink
Simplify isAdmin function and add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamie Snape committed Sep 14, 2015
1 parent a26efe2 commit d00713f
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions core/models/dao/UserDao.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,21 +84,17 @@ class UserDao extends AppDao
/**
* Return true if this user is an administrator.
*
* @return bool
* @return bool true if this user is an administrator, false otherwise.
*/
public function isAdmin()
{
if ($this->getAdmin() == 1) {
return true;
}

return false;
return $this->getAdmin() == 1;
}

/**
* Return the full name of this user.
*
* @return string
* @return string full name of this user
*/
public function getFullName()
{
Expand Down

0 comments on commit d00713f

Please sign in to comment.