diff --git a/classes/context/Context.class.php b/classes/context/Context.class.php
index 28e371cea..6b860e8c8 100644
--- a/classes/context/Context.class.php
+++ b/classes/context/Context.class.php
@@ -2475,6 +2475,22 @@ class Context
return RX_BASEDIR . Rhymix\Framework\Config::$old_ftp_config_filename;
}
+ /**
+ * Set a validator message
+ *
+ * @param string $id
+ * @param string $message
+ * @param string $type (optional)
+ */
+ public static function setValidatorMessage($id, $message, $type = 'info')
+ {
+ $_SESSION['XE_VALIDATOR_ID'] = $id;
+ $_SESSION['XE_VALIDATOR_MESSAGE'] = $message;
+ $_SESSION['XE_VALIDATOR_MESSAGE_TYPE'] = $type;
+ $_SESSION['XE_VALIDATOR_ERROR'] = $type === 'error' ? -1 : 0;
+ $_SESSION['XE_VALIDATOR_RETURN_URL'] = null;
+ }
+
/**
* Checks whether XE is installed
*
diff --git a/modules/member/lang/en.php b/modules/member/lang/en.php
index 7d5dcd4a5..e8bf03415 100644
--- a/modules/member/lang/en.php
+++ b/modules/member/lang/en.php
@@ -135,8 +135,8 @@ $lang->msg_confirm_account_comment = 'Click on the following link to complete yo
$lang->msg_auth_mail_sent = 'The activation mail has been sent to %s. Please check your mail.';
$lang->msg_confirm_mail_sent = 'We have just sent the activation email to %s. Please check your mail.';
$lang->msg_invalid_auth_key = 'This is an invalid request of verification.
Please retry finding account info or contact the administrator.';
-$lang->msg_success_authed = 'Your account has been successfully activated and logged on.\\n Please modify the password to your own one with the password in the mail.';
-$lang->msg_success_confirmed = 'Your account has been activated successfully.';
+$lang->msg_success_authed = 'Please use the password you received in the email to log in, and change it to a password of your choice as soon as possible.';
+$lang->msg_success_confirmed = 'Your account has been activated. You may log in now.';
$lang->msg_new_member = 'Add Member';
$lang->msg_rechecked_password = 'Re-checked password';
$lang->msg_update_member = 'View and Modify User Info';
diff --git a/modules/member/lang/ko.php b/modules/member/lang/ko.php
index 8fe5637e0..382170b4b 100644
--- a/modules/member/lang/ko.php
+++ b/modules/member/lang/ko.php
@@ -143,8 +143,8 @@ $lang->msg_confirm_mail_sent = '%s 메일로 가입 인증 메일이 발송되
$lang->msg_change_mail_sent = '%s 메일로 이메일 변경 인증 메일이 발송되었습니다. 메일을 확인하세요.';
$lang->msg_invalid_modify_email_auth_key = '잘못된 이메일 변경 요청입니다.
이메일 변경요청을 다시 하거나 사이트 관리자에게 문의해주세요.';
$lang->msg_invalid_auth_key = '잘못된 계정 인증 요청입니다.
아이디/비밀번호 찾기를 다시 하거나 사이트 관리자에게 계정 정보를 문의해주세요.';
-$lang->msg_success_authed = '인증이 정상적으로 되어 임시 비밀번호로 변경 처리가 되었습니다.\\n꼭 인증 메일에 표시된 비밀번호를 이용하여 원하는 비밀번호로 변경하세요.';
-$lang->msg_success_confirmed = '가입 인증이 정상적으로 처리 되었습니다.';
+$lang->msg_success_authed = '임시 비밀번호로 변경되었습니다.
로그인 후 반드시 다른 비밀번호로 변경하시기 바랍니다.';
+$lang->msg_success_confirmed = '가입 인증이 완료되었습니다. 이제 로그인하실 수 있습니다.';
$lang->msg_new_member = '회원 추가';
$lang->msg_rechecked_password = '비밀번호 재확인';
$lang->msg_update_member = '회원정보 조회/수정';
diff --git a/modules/member/member.controller.php b/modules/member/member.controller.php
index 17ed1762f..93a20de1c 100644
--- a/modules/member/member.controller.php
+++ b/modules/member/member.controller.php
@@ -1444,40 +1444,33 @@ class memberController extends member
// Test logs for finding password by user_id and authkey
$args = new stdClass;
$args->member_srl = $member_srl;
- $args->auth_key = $auth_key;
$output = executeQuery('member.getAuthMail', $args);
- if(!$output->toBool() || $output->data->auth_key != $auth_key)
- {
- if(strlen($output->data->auth_key) !== strlen($auth_key))
- {
- executeQuery('member.deleteAuthMail', $args);
- }
-
- return $this->stop('msg_invalid_auth_key');
- }
-
- if(ztime($output->data->regdate) < time() - 86400)
+ if(!$output->toBool() || $output->data->auth_key !== $auth_key)
{
executeQuery('member.deleteAuthMail', $args);
return $this->stop('msg_invalid_auth_key');
}
- $args->password = $output->data->new_password;
+ if(ztime($output->data->regdate) < time() - (86400 * 3))
+ {
+ executeQuery('member.deleteAuthMail', $args);
+ return $this->stop('msg_invalid_auth_key');
+ }
+
+ // Back up the value of $output->data->is_register
+ $is_register = $output->data->is_register;
// If credentials are correct, change the password to a new one
- if($output->data->is_register == 'Y')
+ if($is_register === 'Y')
{
$args->denied = 'N';
}
else
{
- $args->password = $oMemberModel->hashPassword($args->password);
+ $args->password = $oMemberModel->hashPassword($output->data->new_password);
}
- // Back up the value of $Output->data->is_register
- $is_register = $output->data->is_register;
-
$output = executeQuery('member.updateMemberPassword', $args);
if(!$output->toBool())
{
@@ -1490,13 +1483,13 @@ class memberController extends member
$this->_clearMemberCache($args->member_srl);
// Call a trigger (after)
- $trigger_obj->is_register = $output->data->is_register;
+ $trigger_obj->is_register = $is_register;
$trigger_output = ModuleHandler::triggerCall('member.procMemberAuthAccount', 'after', $trigger_obj);
// Notify the result
- Context::set('is_register', $is_register);
- $this->setTemplatePath($this->module_path.'tpl');
- $this->setTemplateFile('msg_success_authed');
+ $message = $is_register === 'Y' ? lang('msg_success_confirmed') : lang('msg_success_authed');
+ Context::setValidatorMessage('modules/member/skins', $message);
+ $this->setRedirectUrl(getNotEncodedUrl('', 'act', 'dispMemberLoginForm'));
}
/**
diff --git a/modules/member/queries/getAuthMail.xml b/modules/member/queries/getAuthMail.xml
index 8e648e2a0..400c048fc 100644
--- a/modules/member/queries/getAuthMail.xml
+++ b/modules/member/queries/getAuthMail.xml
@@ -6,7 +6,7 @@
-
-
+
+
diff --git a/modules/member/tpl/msg_success_authed.html b/modules/member/tpl/msg_success_authed.html
deleted file mode 100644
index 5d8d9347a..000000000
--- a/modules/member/tpl/msg_success_authed.html
+++ /dev/null
@@ -1,8 +0,0 @@
-