07-20-2019, 02:45 PM
What are you trying to accomplish? I don't see any javascript there. Try this
if(hasPerm([2],$user->data()->id)){
die("Has permission);
}else{
die("Does not have permission");
}
if(hasPerm([2],$user->data()->id)){
die("Has permission);
}else{
die("Does not have permission");
}