diff --git a/user.inc.php b/user.inc.php index a0fd1436..a14c3556 100644 --- a/user.inc.php +++ b/user.inc.php @@ -734,8 +734,7 @@ function user_save(&$u) if(mysql_error() != '') return "SQLERR3: " . mysql_error(); if( // if this user has an altered available judging times selection, we need to save it - array_key_exists('available_times', $u) && - count(array_diff_assoc($u['available_times'], $u['orig']['available_times'])) > 0 + array_key_exists('available_times', $u) ){ mysql_query("DELETE FROM judges_availability WHERE users_id='{$u['id']}'"); @@ -758,8 +757,7 @@ function user_save(&$u) if(mysql_error() != '') return "SQLERR3: " . mysql_error(); if( // if this user has an altered event availability selection, we need to save it - array_key_exists('available_events', $u) && - count(array_diff_assoc($u['available_events'], $u['orig']['available_events'])) > 0 + array_key_exists('available_events', $u) ){ mysql_query("DELETE FROM schedule_users_availability_link WHERE users_id = {$u['id']}"); if(count($u['available_events']) > 0){