r11099 Added a check logic to member controller.

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.3.2@11101 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
devjin 2012-08-27 08:45:59 +00:00
parent a738206cdf
commit d7e4cdf1d2
2 changed files with 18 additions and 9 deletions

View file

@ -363,7 +363,7 @@
function procMemberModifyInfoBefore()
{
if(!$_SESSION['rechecked_password_step'])
if($_SESSION['rechecked_password_step'] != 'INPUT_PASSWORD')
{
return $this->stop('msg_invalid_request');
}
@ -394,8 +394,7 @@
return new Object(-1, 'invalid_password');
}
$_SESSION['rechecked_password'] = TRUE;
$_SESSION['rechecked_password_step'] = FALSE;
$_SESSION['rechecked_password_step'] = 'VALIDATE_PASSWORD';
$redirectUrl = getUrl('', 'act', 'dispMemberModifyInfo');
$this->setRedirectUrl($redirectUrl);
@ -407,8 +406,19 @@
*
* @return void|Object (void : success, Object : fail)
**/
function procMemberModifyInfo() {
if(!Context::get('is_logged')) return $this->stop('msg_not_logged');
function procMemberModifyInfo()
{
if(!Context::get('is_logged'))
{
return $this->stop('msg_not_logged');
}
if($_SESSION['rechecked_password_step'] != 'INPUT_DATA')
{
return $this->stop('msg_invalid_request');
}
unset($_SESSION['rechecked_password_step']);
// Extract the necessary information in advance
$oMemberModel = &getModel ('member');
$config = $oMemberModel->getMemberConfig ();

View file

@ -220,8 +220,7 @@
return $this->stop('msg_not_logged');
}
$_SESSION['rechecked_password'] = FALSE;
$_SESSION['rechecked_password_step'] = TRUE;
$_SESSION['rechecked_password_step'] = 'INPUT_PASSWORD';
$templateFile = $this->getTemplatePath().'rechecked_password.html';
if(!is_readable($templateFile))
@ -249,13 +248,13 @@
**/
function dispMemberModifyInfo()
{
if(!$_SESSION['rechecked_password'])
if($_SESSION['rechecked_password_step'] != 'VALIDATE_PASSWORD')
{
$this->dispMemberModifyInfoBefore();
return;
}
$_SESSION['rechecked_password'] = FALSE;
$_SESSION['rechecked_password_step'] = 'INPUT_DATA';
$member_config = $this->member_config;