Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Issue #15893: Improve logging when resetting user password

  • Loading branch information...
commit 7c2273d6018a5378fcb8683e95d63b0214ce56c5 1 parent a1cb667
@dregad dregad authored
Showing with 9 additions and 5 deletions.
  1. +1 −1  core/email_api.php
  2. +8 −4 manage_user_update.php
View
2  core/email_api.php
@@ -496,7 +496,7 @@ function email_send_confirm_hash_url( $p_user_id, $p_confirm_hash ) {
# or else users won't be able to receive their reset pws
if( !is_blank( $t_email ) ) {
email_store( $t_email, $t_subject, $t_message );
- log_event( LOG_EMAIL, sprintf( 'Password reset for email = %s', $t_email ) );
+ log_event( LOG_EMAIL, sprintf( 'Password reset for user %s sent to %s', $p_user_id, $t_email ) );
@atrol Collaborator
atrol added a note

Maybe "user with id %d" is a bit more clean than "user %s"

@dregad Owner
dregad added a note

fixed in f54a191

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
if( OFF == config_get( 'email_send_using_cronjob' ) ) {
email_send_all();
View
12 manage_user_update.php
@@ -166,10 +166,14 @@
$t_subject = '[' . config_get( 'window_title' ) . '] ' . lang_get( 'email_user_updated_subject' );
$t_updated_msg = lang_get( 'email_user_updated_msg' );
$t_message = $t_updated_msg . "\n\n" . config_get( 'path' ) . 'account_page.php' . "\n\n" . $t_changes;
- email_store( $t_email, $t_subject, $t_message );
- log_event( LOG_EMAIL, sprintf( 'Account update notification sent to ' . $f_username . ' (' . $t_email . ')' ) );
- if ( config_get( 'email_send_using_cronjob' ) == OFF ) {
- email_send_all();
+
+ if( null === email_store( $t_email, $t_subject, $t_message ) ) {
+ log_event( LOG_EMAIL, sprintf( 'Notification was NOT sent to ' . $f_username ) );
+ } else {
+ log_event( LOG_EMAIL, sprintf( 'Account update notification sent to ' . $f_username . ' (' . $t_email . ')' ) );
+ if ( config_get( 'email_send_using_cronjob' ) == OFF ) {
+ email_send_all();
+ }
}
}
lang_pop();
Please sign in to comment.
Something went wrong with that request. Please try again.