/** * @param $sticky * @param OAuth\Plugin\AbstractAdapter $service * @param string $servicename * @param string $page * * @return bool */ protected function processLogin($sticky, $service, $servicename, $page) { $uinfo = $service->getUser(); $ok = $this->processUser($uinfo, $servicename); if (!$ok) { return false; } $this->setUserSession($uinfo, $servicename); $this->setUserCookie($uinfo['user'], $sticky, $servicename); if (isset($page)) { send_redirect(wl($page)); } return true; }
/** * @param $sticky * @param OAuth\Plugin\AbstractAdapter $service * @param string $servicename * @param string $page * @param array $params * * @return bool */ protected function processLogin($sticky, $service, $servicename, $page, $params = array()) { $uinfo = $service->getUser(); $ok = $this->processUser($uinfo, $servicename); if (!$ok) { return false; } $this->setUserSession($uinfo, $servicename); $this->setUserCookie($uinfo['user'], $sticky, $servicename); if (isset($page)) { if (!empty($params['id'])) { unset($params['id']); } send_redirect(wl($page, $params, false, '&')); } return true; }