mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-25 21:32:51 +09:00
Update procMemberAuthAccount
- 불필요한 중복 체크 제거 - 인증 성공시 alert을 사용하지 않고 인증 관련 안내 메시지를 XE_VALIDATOR_MESSAGE에 넣은 후 로그인 화면으로 리다이렉트 - XE_VALIDATOR_MESSAGE를 임의로 지정할 수 있도록 Context::setValidatorMessage() 함수 추가
This commit is contained in:
parent
dc0add9e8c
commit
87d8ba41e3
6 changed files with 37 additions and 36 deletions
|
|
@ -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
|
||||
*
|
||||
|
|
|
|||
|
|
@ -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.<br />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';
|
||||
|
|
|
|||
|
|
@ -143,8 +143,8 @@ $lang->msg_confirm_mail_sent = '%s 메일로 가입 인증 메일이 발송되
|
|||
$lang->msg_change_mail_sent = '%s 메일로 이메일 변경 인증 메일이 발송되었습니다. 메일을 확인하세요.';
|
||||
$lang->msg_invalid_modify_email_auth_key = '잘못된 이메일 변경 요청입니다.<br />이메일 변경요청을 다시 하거나 사이트 관리자에게 문의해주세요.';
|
||||
$lang->msg_invalid_auth_key = '잘못된 계정 인증 요청입니다.<br />아이디/비밀번호 찾기를 다시 하거나 사이트 관리자에게 계정 정보를 문의해주세요.';
|
||||
$lang->msg_success_authed = '인증이 정상적으로 되어 임시 비밀번호로 변경 처리가 되었습니다.\\n꼭 인증 메일에 표시된 비밀번호를 이용하여 원하는 비밀번호로 변경하세요.';
|
||||
$lang->msg_success_confirmed = '가입 인증이 정상적으로 처리 되었습니다.';
|
||||
$lang->msg_success_authed = '임시 비밀번호로 변경되었습니다.<br />로그인 후 반드시 다른 비밀번호로 변경하시기 바랍니다.';
|
||||
$lang->msg_success_confirmed = '가입 인증이 완료되었습니다. 이제 로그인하실 수 있습니다.';
|
||||
$lang->msg_new_member = '회원 추가';
|
||||
$lang->msg_rechecked_password = '비밀번호 재확인';
|
||||
$lang->msg_update_member = '회원정보 조회/수정';
|
||||
|
|
|
|||
|
|
@ -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'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
<column name="*" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="auth_key" var="auth_key" notnull="notnull" />
|
||||
<condition operation="equal" column="member_srl" var="member_srl" notnull="notnull" pipe="and" />
|
||||
<condition operation="equal" column="member_srl" var="member_srl" notnull="notnull" />
|
||||
<condition operation="equal" column="auth_key" var="auth_key" pipe="and" />
|
||||
</conditions>
|
||||
</query>
|
||||
|
|
|
|||
|
|
@ -1,8 +0,0 @@
|
|||
<script>
|
||||
<!--@if ($is_register == 'Y')-->
|
||||
alert("{$lang->msg_success_confirmed}");
|
||||
<!--@else-->
|
||||
alert("{$lang->msg_success_authed}");
|
||||
<!--@end-->
|
||||
location.href="{getUrl()}";
|
||||
</script>
|
||||
Loading…
Add table
Add a link
Reference in a new issue