Ver código fonte

Fixed getRole returning array

tags/v1.3^2
Teknikode 5 anos atrás
pai
commit
574066208d
1 arquivos alterados com 2 adições e 12 exclusões
  1. 2
    12
      includes/classes/Role.class.php

+ 2
- 12
includes/classes/Role.class.php Ver arquivo

@@ -37,18 +37,8 @@ class Role
// Get Role by Name
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;
$role = $db->select('roles', "role_name=? LIMIT 1", array($role_name));
return $role;
}
// Get all Roles

Carregando…
Cancelar
Salvar