merged cherry picked commit

This commit is contained in:
jwacalex 2016-11-30 23:31:21 +01:00
commit 6a591e7557
1 changed files with 2 additions and 1 deletions

View File

@ -43,7 +43,8 @@ function shift_entry_add_controller() {
}
$type = $type[0];
if (isset($_REQUEST['user_id']) && preg_match("/^[0-9]*$/", $_REQUEST['user_id']) && in_array('user_shifts_admin', $privileges)) {
if (isset($_REQUEST['user_id']) && preg_match("/^[0-9]*$/", $_REQUEST['user_id']) &&
in_array('user_shifts_admin', $privileges)) {
$user_id = $_REQUEST['user_id'];
} else {
$user_id = $user['UID'];