$GO_SECURITY->delete_user_from_acl($_POST['id'], $GO_MODULES->f('acl_write'));
     }
     if ($can_write && !$could_write) {
         $GO_SECURITY->add_user_to_acl($_POST['id'], $GO_MODULES->f('acl_write'));
     }
 }
 $GO_GROUPS->get_all_groups();
 $groups2 = new GO_GROUPS();
 while ($GO_GROUPS->next_record()) {
     $is_in_group = $groups2->is_in_group($_REQUEST['id'], $GO_GROUPS->f('id'));
     $should_be_in_group = isset($_POST['user_groups']) ? in_array($GO_GROUPS->f('id'), $_POST['user_groups']) : false;
     if ($is_in_group && !$should_be_in_group) {
         $groups2->delete_user_from_group($_REQUEST['id'], $GO_GROUPS->f('id'));
     }
     if (!$is_in_group && $should_be_in_group) {
         $groups2->add_user_to_group($_REQUEST['id'], $GO_GROUPS->f('id'));
     }
 }
 $val = new validate();
 //translate the given birthdayto gmt unix time
 $birthday = date_to_db_date($_POST['birthday']);
 $val->error_required = $error_required;
 $val->error_min_length = $error_min_length;
 $val->error_max_length = $error_max_length;
 $val->error_expression = $error_email;
 $val->error_match = $error_match_auth;
 $val->name = "first_name";
 $val->input = $_POST['first_name'];
 $val->max_length = 50;
 $val->required = true;
 $val->validate_input();