17497270: 17497245: 오픈아이디 관련 이슈 일괄 해결

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5021 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
araste 2008-11-28 07:32:50 +00:00
parent d254e6d8ae
commit 10c4a7ee0d
8 changed files with 25 additions and 11 deletions

View file

@ -52,6 +52,12 @@
require_once('./modules/member/openid_lib/libcurlemu.inc.php');
$user_id = Context::get('user_id');
if (!$user_id) $user_id = Context::get('openid');
$referer_url = Context::get('referer_url');
if (!$referer_url) $referer_url = $_SERVER['HTTP_REFERER'];
if (!$referer_url)
$referer_url = htmlspecialchars_decode(getRequestUri(RELEASE_SSL));
$openid = new SimpleOpenID();
@ -65,12 +71,17 @@
$error = $openid->GetError();
$this->setError(-1);
$this->setMessage($error['description']);
if (Context::getRequestMethod() == 'POST')
header("location:" . $referer_url);
} else {
$goto = urlencode(substr($_SERVER['HTTP_REFERER'],strlen(Context::getRequestUri(RELEASE_SSL))));
$goto = urlencode($referer_url);
$ApprovedURL = Context::getRequestUri(RELEASE_SSL) . "?module=member&act=procMemberOpenIDValidate&goto=" . $goto;
$openid->SetApprovedURL($ApprovedURL);
$url = $openid->GetRedirectURL();
$this->add('redirect_url', $url);
if (Context::getRequestMethod() == 'POST')
header("location:" . $url);
}
ob_clean();
}
@ -118,7 +129,7 @@
// 페이지 이동
if(Context::get('goto')){
$goto = Context::get('goto');
header("location:./" . $goto);
header("location:" . $goto);
}else{
header("location:./");
}