4 class Login_AutologinResponse
23 public function __construct($status = 'error', $message = null)
25 $this->status = $status;
26 $this->message = $message;
29 public function send()
31 if ($this->status == 'error') {
32 //Cookie to prevent trying autologin again and again.
33 // After 1 hour the cookie expires and autologin is tried again.
34 setcookie('tried-autologin', '1', time() + 60 * 60);
37 $data = htmlspecialchars(json_encode($this), ENT_NOQUOTES);
38 header('Content-type: text/html');
42 <title>Autologin response</title>
43 <script type="text/javascript">
44 parent.notifyAutologin($data);