From c4f0334feae6676cfd92fc128ebe8e551f2c7717 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mart=C3=ADn=20Marrese?= Date: Tue, 26 Aug 2003 18:41:26 +0000 Subject: [PATCH] Mayor bugfix. --- lib/SAMURAI/Perm.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/SAMURAI/Perm.php b/lib/SAMURAI/Perm.php index a8148ae..965665c 100644 --- a/lib/SAMURAI/Perm.php +++ b/lib/SAMURAI/Perm.php @@ -83,7 +83,8 @@ class SAMURAI_Perm { $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']; } -- 2.43.0