/** * @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']); } }
<?php require_once 'lib/helpers/Cookie.php'; // just drop cookie \MODXCookie\helpers\Cookie::clear('user');