diff --git a/bureau/class/m_admin.php b/bureau/class/m_admin.php index aeb2b276..ffbc8a21 100644 --- a/bureau/class/m_admin.php +++ b/bureau/class/m_admin.php @@ -145,6 +145,17 @@ class m_admin { } } + # return the uid of an alternc account + function get_uid_by_login($login) { + global $db; + $db->query("SELECT uid FROM membres WHERE login='$login';"); + if (! $db->next_record()) { + return null; + } + return $db->f('uid'); + } + + /* ----------------------------------------------------------------- */ /** Returns the known information about a hosted account * diff --git a/bureau/class/m_mem.php b/bureau/class/m_mem.php index 32181367..d2e9efe6 100644 --- a/bureau/class/m_mem.php +++ b/bureau/class/m_mem.php @@ -613,6 +613,7 @@ Cordially. function session_tempo_params_get($v) { global $uid; + if (empty($_COOKIE['session'])) return false; $sid=$_COOKIE['session']; if ( empty($_SESSION[$sid.'-'.$uid]) ) { // si pas de session de params tempo return false; @@ -627,6 +628,7 @@ Cordially. function session_tempo_params_set($k, $v, $ecrase=false) { global $uid; + if (empty($_COOKIE['session'])) return false; $sid=$_COOKIE['session']; $p=Array(); if ( ! empty($_SESSION[$sid.'-'.$uid]) ) {