meta_find_user_for_mail ( $email ); if (! isset ( $user )) { $alert_class = "alert-danger"; $alert_message = "Email not found: " . htmlspecialchars ( $email ); include_once ('includes/inline_message.php'); } else { $meta_model = $htpasswd->get_metadata () [$user]; $link = $mailUrl . '?' . 'user=' . urldecode ( $user ) . '&' . 'key=' . urlencode ( $meta_model->mailkey ); send_forgotten_mail ( $email, $user, $link ); $alert_class = "alert-info"; $alert_message = "Email successfully sent. Please check your inbox. " . htmlspecialchars ( $email ); include_once ('includes/inline_message.php'); } } if (isset ( $_GET ['user'] ) && isset ( $_GET ['key'] )) { $user = $_GET ['user']; $key = $_GET ['key']; $meta_model = $htpasswd->get_metadata () [$user]; if (isset ( $meta_model ) && $meta_model->mailkey === $key) { $show_standardform = false; ?>

Reset Password:

get_metadata () [$user]; if (isset ( $meta_model ) && $meta_model->mailkey === $key) { $htpasswd->user_update ( $user, $pwd ); $meta_model->mailkey = random_password ( 8 ); $htpasswd->meta_update ( $meta_model ); $alert_class = "alert-info"; $alert_message = "Password changed."; include_once ('includes/inline_message.php'); } else { $alert_class = "alert-danger"; $alert_message = "Could not reset password."; include_once ('includes/inline_message.php'); } } if ($show_standardform) { ?>

Password forgotten?