71 $old_session_id = session_id();
72 session_regenerate_id();
73 $pwassist_id = session_id();
74 session_id($old_session_id);
90 $q =
"SELECT * FROM usr_pwassist ".
91 "WHERE pwassist_id = ".$ilDB->quote($pwassist_id,
"text");
92 $r = $ilDB->query($q);
93 $data = $ilDB->fetchAssoc($r);
110 $q =
"SELECT * FROM usr_pwassist ".
111 "WHERE user_id = ".$ilDB->quote($user_id,
"integer");
112 $r = $ilDB->query($q);
113 $data = $ilDB->fetchAssoc($r);
129 $q =
"DELETE FROM usr_pwassist ".
130 "WHERE pwassist_id = ".$ilDB->quote($pwassist_id,
"text").
" ".
131 "OR user_id = ".$ilDB->quote($user_id,
'integer');
132 $ilDB->manipulate($q);
135 $expires = $ctime + $maxlifetime;
136 $ilDB->manipulateF(
"INSERT INTO usr_pwassist ".
137 "(pwassist_id, expires, user_id, ctime) ".
138 "VALUES (%s,%s,%s,%s)",
139 array(
"text",
"integer",
"integer",
"integer"),
140 array($pwassist_id, $expires, $user_id, $ctime));
154 $q =
"DELETE FROM usr_pwassist ".
155 "WHERE pwassist_id = ".$ilDB->quote($pwassist_id,
"text");
156 $ilDB->manipulate($q);
167 global $pear_session_db,
$ilDB;
169 $q =
"DELETE FROM usr_pwassist ".
170 "WHERE expires < ".$ilDB->quote(time(),
"integer");
171 $ilDB->manipulate($q);