setCallbacks([ function($a) { return !strcmp($a, "status = teacher"); } ]); try { $bool = $v->verify($m, 'pocsecret'); } catch(Exception $e) { $bool = false; } if($bool) { echo "Access granted.\n
Welcome ".$m->getIdentifier()."!"; } else { echo "Access denied. Service is restricted to teachers."; }