move new_cookie() to the session driver so we can use it for other purposes besides "normal" web login (for instance magic auth)
This commit is contained in:
@@ -198,13 +198,3 @@ else {
|
||||
authenticate_success($record, true, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function new_cookie($time) {
|
||||
$old_sid = session_id();
|
||||
session_set_cookie_params("$time");
|
||||
session_regenerate_id(false);
|
||||
|
||||
q("UPDATE session SET sid = '%s' WHERE sid = '%s'", dbesc(session_id()), dbesc($old_sid));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user