main/admin/user_list.php 1 location
|
@@ 675-679 (lines=5) @@
|
| 672 |
|
$current_user_id = api_get_user_id(); |
| 673 |
|
|
| 674 |
|
if ($deleteUserAvailable && api_global_admin_can_edit_admin($_GET['user_id'])) { |
| 675 |
|
if ($user_to_delete != $current_user_id && UserManager :: delete_user($_GET['user_id'])) { |
| 676 |
|
$message = Display :: return_message(get_lang('UserDeleted'), 'confirmation'); |
| 677 |
|
} else { |
| 678 |
|
$message = Display :: return_message(get_lang('CannotDeleteUserBecauseOwnsCourse'), 'error'); |
| 679 |
|
} |
| 680 |
|
} else { |
| 681 |
|
$message = Display :: return_message(get_lang('CannotDeleteUser'),'error'); |
| 682 |
|
} |
main/session/session_user_edit.php 1 location
|
@@ 83-88 (lines=6) @@
|
| 80 |
|
if ($form->validate()) { |
| 81 |
|
$duration = $form->getSubmitValue('duration'); |
| 82 |
|
// Only update if the duration is different from the default duration |
| 83 |
|
if ($duration != 0) { |
| 84 |
|
SessionManager::editUserSessionDuration($duration, $userId, $sessionId); |
| 85 |
|
$message = Display::return_message(get_lang('ItemUpdated'), 'confirmation'); |
| 86 |
|
} else { |
| 87 |
|
$message = Display::return_message(get_lang('DurationIsSameAsDefault'), 'warning'); |
| 88 |
|
} |
| 89 |
|
} |
| 90 |
|
|
| 91 |
|
// display the header |