* added security condition to check that one logged-in user cannot activate another one user via email activation link;

* fixed double handler of email activation link (wp_die doesn't stop the script for some reason);
* added redirects to login page with error notices instead of wp_die text;
This commit is contained in:
Mykyta Synelnikov
2024-10-11 18:47:40 +03:00
parent 62cc39e2ef
commit 1cbbb70a03
4 changed files with 20 additions and 12 deletions
+6
View File
@@ -176,6 +176,12 @@ function um_add_update_notice( $args ) {
case 'invalid_nonce':
$err = __( 'An error has been encountered. Probably page was cached. Please try again.', 'ultimate-member' );
break;
case 'activation_link_used':
$err = __( 'This activation link is expired or have already been used.', 'ultimate-member' );
break;
case 'activation_link_expired':
$err = __( 'This activation link is expired.', 'ultimate-member' );
break;
}
}
// phpcs:enable WordPress.Security.NonceVerification -- used for echo and already verified here.