Merge branch 'ent-10106-borrar-sesion-de-usuario-cuando-se-borra-un-usuario' into 'develop'
Ent 10106 borrar sesion de usuario cuando se borra un usuario See merge request artica/pandorafms!5397
This commit is contained in:
commit
0a4ddc480a
|
@ -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