Skip to content

Commit 2c0f90b

Browse files
Admin: Avoid error when updating user if expiration date is enabled but has no value
Author: Juan Cortizas Ponte <[email protected]>
1 parent d7f3a8e commit 2c0f90b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

main/admin/user_edit.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,11 @@ function confirmation(name) {
479479

480480
$expiration_date = null;
481481
if (!$user_data['platform_admin'] && $user['radio_expiration_date'] == '1') {
482+
if (empty($user['expiration_date'])) {
483+
Display::addFlash(Display::return_message(get_lang('EmptyExpirationDate')));
484+
header('Location: '.api_get_self().'?user_id='.$user_id);
485+
exit();
486+
}
482487
$expiration_date = $user['expiration_date'];
483488
}
484489

0 commit comments

Comments
 (0)