add_system_message(_("At least one of the parameters is empty."), "error"); forward("user/settings/".$user->username); } else if (!$TeKe->user->is_valid_email($email)) { $TeKe->add_system_message(_("Email is not valid."), "error"); forward("user/settings/".$user->username); } else if ($user->email != $email && $TeKe->user->check_email_exists($email)) { $TeKe->add_system_message(_("User with that email already exists."), "error"); forward("user/settings/".$user->username); } else { if ($TeKe->user->update_settings($user, $first_name, $last_name, $email, $language, $types)) { $TeKe->add_system_message(_("Settings saved.")); } else { $TeKe->add_system_message(_("Error occured."), 'error'); forward("user/settings/".$user->username); } } unset($_SESSION['input_values']); forward("user/settings/".$user->username); ?>