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