예제 #1
0
파일: Core.php 프로젝트: mheydt/scalr
 public function supportAction()
 {
     if ($this->user->isAdmin()) {
         throw new Scalr_Exception_InsufficientPermissions();
     }
     if ($this->user) {
         $args = array("name" => $this->user->fullname, "AccountID" => $this->user->getAccountId(), "email" => $this->user->getEmail(), "expires" => date("D M d H:i:s O Y", time() + 120));
         $token = CryptoTool::generateTenderMultipassToken(json_encode($args));
         $this->response->setRedirect("http://support.scalr.net/?sso={$token}");
     } else {
         $this->response->setRedirect("/");
     }
 }