From a67c0c94d03686d0d539c5945451422f53c2e06e Mon Sep 17 00:00:00 2001 From: Ultimate Member Date: Fri, 22 Jan 2016 19:14:43 +0200 Subject: [PATCH] Minor tweak to activation link --- core/um-permalinks.php | 5 ++--- core/um-user.php | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/core/um-permalinks.php b/core/um-permalinks.php index 84adff62..45d7daa0 100644 --- a/core/um-permalinks.php +++ b/core/um-permalinks.php @@ -112,9 +112,8 @@ class UM_Permalinks { um_fetch_user( $user_id ); - if ( um_user('account_status') != 'awaiting_email_confirmation' ) wp_die('The activation link you used is invalid or has expired.'); - - if ( strtolower($_REQUEST['hash']) !== strtolower( um_user('account_secret_hash') ) ) wp_die('The secret key provided does not match this one for the user.'); + if ( strtolower($_REQUEST['hash']) !== strtolower( um_user('account_secret_hash') ) ) + wp_die( __( 'This activation link is expired or have already been used.','ultimatemember' ) ); $ultimatemember->user->approve(); $redirect = ( um_user('url_email_activate') ) ? um_user('url_email_activate') : um_get_core_page('login', 'account_active'); diff --git a/core/um-user.php b/core/um-user.php index 250503cd..5bfe80c9 100644 --- a/core/um-user.php +++ b/core/um-user.php @@ -490,7 +490,7 @@ class UM_User { /*** *** @pending email ***/ - function email_pending(){ + function email_pending() { global $ultimatemember; $this->assign_secretkey(); $this->set_status('awaiting_email_confirmation');