#10106 deleted session when user is deleted
This commit is contained in:
parent
1ce72edf0f
commit
a7fccc2f77
|
@ -333,6 +333,7 @@ if ($delete_user === true) {
|
|||
$result = delete_user($id_user);
|
||||
|
||||
if ($result) {
|
||||
delete_session_user($id_user);
|
||||
db_pandora_audit(
|
||||
AUDIT_LOG_USER_MANAGEMENT,
|
||||
__('Deleted user %s', io_safe_output($id_user))
|
||||
|
|
|
@ -811,6 +811,20 @@ function users_get_users_by_group($id_group, $um=false, $disabled=true)
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Delete session user if exist
|
||||
*
|
||||
* @param string $id_user User id.
|
||||
*
|
||||
* @return boolean Return .
|
||||
*/
|
||||
function delete_session_user($id_user)
|
||||
{
|
||||
$sql = "DELETE FROM tsessions_php where data like '%\"".$id_user."\"%'";
|
||||
return db_process_sql($sql);
|
||||
}
|
||||
|
||||
|
||||
function users_has_profile_without_UM($id_user, $id_groups)
|
||||
{
|
||||
$sql = sprintf(
|
||||
|
|
Loading…
Reference in New Issue