public function index(Request $request) { $credential = $this->credentialStore->findByEmail($this->user->email); $gmailWatch = $this->watchStore->findByEmailAndService($this->user->email, 'gmail'); if ($gmailWatch) { $gmailWatchExpiration = $gmailWatch->expiration; } else { $gmailWatchExpiration = null; } return view('dashboard', ['isDev' => $this->app->isDev(), 'user' => $this->user, 'logoutUrl' => UserService::createLogoutURL('/'), 'authorized' => isset($credential), 'watchingGmail' => isset($gmailWatch), 'gmailWatchExpiration' => $gmailWatchExpiration, 'message' => $request->session()->get('message')]); }
<input type="submit" style="display: none" /> </form> <p id="ajax-status"></p> <p id="toolbar"> <?php $user = UserService::getCurrentUser(); if ($user) { ?> <span class="username"><?php echo $user->getNickname(); ?> </span> <a href="<?php echo UserService::createLogoutURL('', "google.com"); ?> ">log out</a> <?php } else { ?> <a href="<?php echo UserService::createLoginURL(''); ?> ">log in</a> <?php } ?> | <a href="reset.do">Reset Session</a> | Shift-Enter for newline | Ctrl-Up/Down for history
public function testCreateLogoutOtherApplicationError() { $req = new \google\appengine\CreateLogoutURLRequest(); $req->setDestinationUrl('http://abc'); $exception = new \google\appengine\runtime\ApplicationError(123, 'yyy'); $this->setExpectedException('\\google\\appengine\\runtime\\ApplicationError', 'yyy'); $this->apiProxyMock->expectCall('user', 'CreateLogoutURL', $req, $exception); UserService::createLogoutURL('http://abc'); }