is_signed_in()) { $errors = array(); $user_pass = ""; if (empty($_POST['user_pass'])) { $errors[] = "You must provide a password."; } else { $user_pass = $_POST['user_pass']; $pass_check = $_POST['user_pass_check']; if (preg_match("/^[a-zA-Z0-9\W]*$/", $user_pass) === false) { $errors[] = "Password contains invalid characters!"; } if ($user_pass !== $pass_check) { $errors[] = "The two passwords do not match."; } } if (!empty($errors)) { echo 'Please check the following problems: '; } else { $pass_hash = password_hash($user_pass, PASSWORD_DEFAULT); change_password(Session::get()->get_current_user(), $pass_hash); echo 'Password successfully changed!'; } } ?> Change your password - cflip.net forum is_signed_in()) { echo '

You must be logged in to change your password.

'; } else { echo '

Change your password






'; } ?>