@ -612,16 +612,7 @@ function modify_filter($user_id,$url_params,$row) {
} else {
$result .= Display::return_icon('admin_star_na.png', get_lang('IsNotAdministrator'));
}
if (api_is_platform_admin()) {
if ($delete_user_available) {
if ($row[0] != $_user['user_id'] & & !$user_is_anonymous) {
// you cannot lock yourself out otherwise you could disable all the accounts including your own => everybody is locked out and nobody can change it anymore.
$result .= ' < a href = "user_list.php?action=delete_user&user_id='.$user_id.'&'.$url_params.'&sec_token='.$_SESSION['sec_token'].'" onclick = "javascript:if(!confirm('." ' " . addslashes ( api_htmlentities ( get_lang ( " ConfirmYourChoice " ) , ENT_QUOTES , $ charset ) ) . " ' " . ' ) ) return false ; " > '.Display::return_icon('delete.png', get_lang('Delete'), array(), 22).'< / a > ';
} else {
$result .= Display::return_icon('delete_na.png', get_lang('Delete'), array(), 22);
}
}
}
// actions for assigning sessions, courses or users
if (api_is_session_admin()) {
@ -637,6 +628,18 @@ function modify_filter($user_id,$url_params,$row) {
$result .= '< a href = "dashboard_add_sessions_to_user.php?user='.$user_id.'" > '.Display::return_icon('view_more_stats.gif', get_lang('AssignSessions')).'< / a > ';
}
}
if (api_is_platform_admin()) {
if ($delete_user_available) {
if ($row[0] != $_user['user_id'] & & !$user_is_anonymous) {
// you cannot lock yourself out otherwise you could disable all the accounts including your own => everybody is locked out and nobody can change it anymore.
$result .= ' < a href = "user_list.php?action=delete_user&user_id='.$user_id.'&'.$url_params.'&sec_token='.$_SESSION['sec_token'].'" onclick = "javascript:if(!confirm('." ' " . addslashes ( api_htmlentities ( get_lang ( " ConfirmYourChoice " ) , ENT_QUOTES , $ charset ) ) . " ' " . ' ) ) return false ; " > '.Display::return_icon('delete.png', get_lang('Delete'), array(), 22).'< / a > ';
} else {
$result .= Display::return_icon('delete_na.png', get_lang('Delete'), array(), 22);
}
}
}
return $result;
}