/** * Function to delete the current user authentication token from the DB and user cookies */ public static function deleteAuthenticationToken() { if (RequestMethods::cookie('AUTHID') != '') { Authtoken::deleteAll(array('token = ?' => RequestMethods::cookie('AUTHID'))); \setcookie('AUTHID', '', time() - 1800); } }