Exemplo n.º 1
0
 /**
  * Logs the user out.
  *
  * @access  public
  */
 public function logout()
 {
     $this->session->regenerateId();
     $this->session->remove($this->authKey);
     $this->response->deleteCookie($this->authKey, $this->cookieOptions);
     $this->user = null;
 }
Exemplo n.º 2
0
 /**
  * Get generated phrase
  *
  * @access  public
  * @return  string
  */
 public function regenerate($width = null, $height = null, $font = null)
 {
     // Builder options
     $width = is_null($width) ? $this->config->get('makocaptcha::config.width') : $width;
     $height = is_null($height) ? $this->config->get('makocaptcha::config.height') : $height;
     $font = is_null($font) ? $this->config->get('makocaptcha::config.font') : $font;
     // Destroy session
     $this->session->remove($this->secret . '::phrase');
     $this->session->remove($this->secret . '::lastModified');
     // Regenerate builder
     $this->setBuilder($width, $height, $font);
 }