From: Harvie Date: Fri, 7 Jan 2011 11:56:09 +0000 (+0100) Subject: Added mechanism to pass jabber credentials to AJAX client X-Git-Url: https://git.harvie.cz/?a=commitdiff_plain;h=a47460dbc3d121f7826d2f0bddf19640a679211f;p=mirrors%2FKyberia-bloodline.git Added mechanism to pass jabber credentials to AJAX client --- diff --git a/wwwroot/inc/eventz/login.inc b/wwwroot/inc/eventz/login.inc index 154cdef..1fb4a04 100644 --- a/wwwroot/inc/eventz/login.inc +++ b/wwwroot/inc/eventz/login.inc @@ -121,6 +121,8 @@ where node_access.user_id='$user_id' and node_bookmark='yes' order by node_name" $_SESSION['user_id']=$user_id; $_SESSION['user_name']=addslashes($user_name); + setcookie('jabber_login', strtolower($user_name), time()+60*60*24*10, '/'); //10days on whole domain - should have persistent username in future... + setcookie('jabber_password', hash('md5', 'jabber:'.$_POST['password']), time()+60*60*24*10, '/'); //10days on whole domain if (!empty($cube_vector)) $_SESSION['cube_vector']=$cube_vector; if (empty($_SESSION['template_set'])) $_SESSION['template_set']=$set->getString('template_set'); if (is_numeric($_POST['screen_width'])) $_SESSION['browser']['screen_width']=$_POST['screen_width'];