Example #1
0
 /**
  * @param $user_hash
  *
  * @return mixed
  */
 private static function getUser($user_hash)
 {
     $user = new User();
     if ($user->get($user_hash)) {
         self::$user = $user;
     } else {
         Cookie::clear(config('cookie')['name']);
     }
 }
Example #2
0
<?php

require_once 'lib/helpers/Cookie.php';
// just drop cookie
\MODXCookie\helpers\Cookie::clear('user');