$query = '
SELECT DISTINCT psu.id_sistema AS sistema, pps.id_permiso AS permiso
FROM samurai.perfil_sist_usuario AS psu, samurai.perm_perfil_sist AS pps
- WHERE psu.login = '.$db->quote($login).' AND psu.id_perfil = pps.id_perfil;';
+ WHERE psu.login = '.$db->quote($login).' AND psu.id_perfil = pps.id_perfil
+ AND psu.id_sistema = pps.id_sistema';
foreach ($db->getAll($query, DB_FETCHMODE_ASSOC) as $row) {
$this->_permisos[$row['sistema']][] = $row['permiso'];
}
function chequear() // ~X2C
{
$args = func_get_args();
- if (!call_user_method_array(array($this, 'tiene'), $args)) {
+ if (!call_user_func_array(array($this, 'tiene'), $args)) {
include 'MECON/includes/no_autorizado.html';
exit;
}