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);
110 $q =
"SELECT * FROM usr_pwassist ".
111 "WHERE user_id = ".$ilDB->quote($user_id,
"integer");
112 $r = $ilDB->query($q);
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);
db_pwassist_session_destroy($pwassist_id)
destroy session
db_pwassist_session_read($pwassist_id)
db_pwassist_session_find($user_id)
Create styles array
The data for the language used.
db_pwassist_session_gc()
removes all expired sessions
db_pwassist_session_close()
close session
db_pwassist_session_open($save_path, $name)
Database Session Handling for the password assistance use case.
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
db_pwassist_session_write($pwassist_id, $maxlifetime, $user_id)
Writes serialized session data to the database.