private function syncSession(Yaf_Session $session, Yaf_Response_Abstract $response) { $authId = $session->offsetGet("wrm_oauth_id"); $authType = $session->offsetGet("wrm_oauth_type"); $session->offsetSet('obj_id', $authId); if ($authType == LoginHandler::OAUTH_TYPE_SINA) { $session->offsetSet('type', 'weibo'); } else { if ($authType == LoginHandler::OAUTH_TYPE_QQ) { $session->offsetSet('type', 'qq'); } else { // AuthPlugin::errorUser("Type was invalid", $response); } } if (is_null($session->offsetGet('status'))) { $state = UserRegisterModel::singleton()->getUserAuthState($session->offsetGet('obj_id')); $session->offsetSet('status', $state); } }