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

Commit d00713f

Browse files
author
Jamie Snape
committed
Simplify isAdmin function and add documentation
1 parent a26efe2 commit d00713f

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

core/models/dao/UserDao.php

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -84,21 +84,17 @@ class UserDao extends AppDao
8484
/**
8585
* Return true if this user is an administrator.
8686
*
87-
* @return bool
87+
* @return bool true if this user is an administrator, false otherwise.
8888
*/
8989
public function isAdmin()
9090
{
91-
if ($this->getAdmin() == 1) {
92-
return true;
93-
}
94-
95-
return false;
91+
return $this->getAdmin() == 1;
9692
}
9793

9894
/**
9995
* Return the full name of this user.
10096
*
101-
* @return string
97+
* @return string full name of this user
10298
*/
10399
public function getFullName()
104100
{

0 commit comments

Comments
 (0)