mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-27 07:09:56 +09:00
fixed login error
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9422 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
4c679ac041
commit
6b4ed81123
1 changed files with 19 additions and 18 deletions
|
|
@ -31,6 +31,7 @@
|
|||
if(!$password) return new Object(-1,'null_password');
|
||||
|
||||
$output = $this->doLogin($user_id, $password, $keep_signed=='Y'?true:false);
|
||||
if (!$output->toBool()) return $output;
|
||||
|
||||
$oModuleModel = &getModel('module');
|
||||
$config = $oModuleModel->getModuleConfig('member');
|
||||
|
|
@ -48,11 +49,11 @@
|
|||
}
|
||||
}
|
||||
|
||||
if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON'))) {
|
||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'mid', Context::get('mid'), 'act', '');
|
||||
$this->setRedirectUrl($returnUrl);
|
||||
return;
|
||||
}
|
||||
if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON'))) {
|
||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'mid', Context::get('mid'), 'act', '');
|
||||
$this->setRedirectUrl($returnUrl);
|
||||
return;
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
|
@ -1437,20 +1438,20 @@
|
|||
// Create a member model object
|
||||
$oMemberModel = &getModel('member');
|
||||
|
||||
// check identifier
|
||||
$config = $oMemberModel->getMemberConfig();
|
||||
if ($config->identifier == 'email_address'){
|
||||
// Get user_id information
|
||||
$this->memberInfo = $oMemberModel->getMemberInfoByEmailAddress($user_id);
|
||||
// Set an invalid user if no value returned
|
||||
if(!$user_id || strtolower($this->memberInfo->email_address) != strtolower($user_id)) return new Object(-1, 'invalid_email_address');
|
||||
// check identifier
|
||||
$config = $oMemberModel->getMemberConfig();
|
||||
if ($config->identifier == 'email_address'){
|
||||
// Get user_id information
|
||||
$this->memberInfo = $oMemberModel->getMemberInfoByEmailAddress($user_id);
|
||||
// Set an invalid user if no value returned
|
||||
if(!$user_id || strtolower($this->memberInfo->email_address) != strtolower($user_id)) return new Object(-1, 'invalid_email_address');
|
||||
|
||||
}else{
|
||||
// Get user_id information
|
||||
$this->memberInfo = $oMemberModel->getMemberInfoByUserID($user_id);
|
||||
// Set an invalid user if no value returned
|
||||
if(!$user_id || strtolower($this->memberInfo->user_id) != strtolower($user_id)) return new Object(-1, 'invalid_user_id');
|
||||
}
|
||||
}else{
|
||||
// Get user_id information
|
||||
$this->memberInfo = $oMemberModel->getMemberInfoByUserID($user_id);
|
||||
// Set an invalid user if no value returned
|
||||
if(!$user_id || strtolower($this->memberInfo->user_id) != strtolower($user_id)) return new Object(-1, 'invalid_user_id');
|
||||
}
|
||||
// Password Check
|
||||
if($password && !$oMemberModel->isValidPassword($this->memberInfo->password, $password)) return new Object(-1, 'invalid_password');
|
||||
// If denied == 'Y', notify
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue