oauth 인증중 token_valid_until만 table column으로 분리

This commit is contained in:
2018-09-09 23:57:26 +09:00
parent 05085ad504
commit f9ffc1c1f3
8 changed files with 24 additions and 24 deletions
+3 -3
View File
@@ -117,7 +117,7 @@ if(!$email){
$userInfo = $RootDB->queryFirstRow(
'SELECT `no`, `id`, `name`, `grade`, `delete_after`, `acl`, oauth_info from member where email=%s',$email);
'SELECT `no`, `id`, `name`, `grade`, `delete_after`, `acl`, oauth_info, token_valid_until from member where email=%s',$email);
if(!$userInfo){
$restAPI->unlink();
@@ -164,9 +164,9 @@ RootDB::db()->update('member', [
], 'no=%i', $userInfo['no']);
$OTPValidUntil = $oauthInfo['OTPValidUntil']??null;
$tokenValidUntil = $userInfo['token_valid_until'];
if(!$OTPValidUntil || $OTPValidUntil < $now){
if(!$tokenValidUntil || $tokenValidUntil < $now){
if(!createOTPbyUserNO($userInfo['no'])){
Json::die([
'result'=>false,