define(USER_FLAG_TY_DISABLE, 0x800000); // done
class User {
+ var $code; // authentication code
var $name; // name of the user
var $sess; // session of the user
var $ip; // ip of the user
if (($thiz =& new User()) == FALSE)
return ($G_false);
+ $thiz->code = -1;
$thiz->name = $name;
$thiz->sess = $sess;
$thiz->ip = $ip;
{
GLOBAL $G_false;
+ $this->code = $from->code;
$this->name = $from->name;
$this->sess = $from->sess;
$this->ip = $from->ip;
if (($thiz =& new User()) == FALSE)
return ($G_false);
+ $thiz->code = $from->code;
$thiz->name = $from->name;
$thiz->sess = $from->sess;
$thiz->ip = $from->ip;
return ($thiz);
}
+
+ function code_get() {
+ return ($this->code);
+ }
function stat_set($stat) {
log_main("sess: [".$this->sess. "] NEW STAT: [".$stat."]");
$ghost_auth = FALSE;
$idx = -1;
$idfree = -1;
-
+ $code = FALSE;
+
if (($name_new = validate_name($name)) == FALSE) {
$idx = -2;
return ($G_false);
if ($authenticate != FALSE) {
+ $this->user[$idx]->code = $authenticate->code_get();
$this->user[$idx]->flags |= USER_FLAG_LISTAUTH;
if (isset($CO_list)) {
$real_idx = $idx;
if ($login_exists)
$idx = -($idx + 1);
- log_main(sprintf("TROVATO LIBERO A [%d] sess [%s] name [%s] count [%d] [%s]", $idx, $sess, $name_new, count($this->user),$this->user[$real_idx]->name));
+ log_main(sprintf("TROVATO LIBERO A [%d] sess [%s] name [%s] count [%d] name [%s] code [%s]", $idx, $sess, $name_new, count($this->user),$this->user[$real_idx]->name, $this->user[$real_idx]->code));
$ret = $this->user[$real_idx];
return ($ret);