Browse Source

Fixed redeclaring getRole()

tags/v1.3^2
Teknikode 5 years ago
parent
commit
f7da4ae69a
1 changed files with 2 additions and 16 deletions
  1. 2
    16
      includes/classes/Role.class.php

+ 2
- 16
includes/classes/Role.class.php View File

@@ -34,6 +34,7 @@ class Role
return isset($this->permissions[$permission]);
}
// Get Role by Name
public function getRole($db, $role_name)
{
$role_list = $db->select('roles', "role_name=?", array($role_name));
@@ -50,6 +51,7 @@ class Role
return $roles;
}
// Get all Roles
public function getRoles($db)
{
$role_list = $db->select('roles', "1=?", array(1));
@@ -65,21 +67,5 @@ class Role
}
return $roles;
}
public function getRole($db, $role_name)
{
$role_list = $db->select('roles', "role_name=?", array($role_name));
$roles = array();
foreach ($role_list as $role)
{
if (!is_array($role))
{
$roles = array($role_list);
break;
}
array_push($roles, $role);
}
return $roles;
}
}
?>

Loading…
Cancel
Save