The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/printthread.php 16 require_once



UserSpice
did_not_have_permission.php - Printable Version

+- UserSpice (https://userspice.com/forums)
+-- Forum: Support Center (https://userspice.com/forums/forumdisplay.php?fid=23)
+--- Forum: UserSpice 4.3 and Below (https://userspice.com/forums/forumdisplay.php?fid=26)
+--- Thread: did_not_have_permission.php (/showthread.php?tid=803)



did_not_have_permission.php - oscar - 10-22-2017

hello, I'm trying to insert a popup alert in the did_not_have_permission pages, so that it will tell the user what went wrong.

I added to the page the code:

`<html><body><script> alert("Acces denied"); </script> </body></html>

but the browser immediately jump to redirect.

If I comment the redirect in the us_helpers.php then popup appears.

I guess it is linked to the intrinsic logic of php, but I did not manage it.

I would like to edit only the did_not pages, without touching the us_helper.

How could I do it?

Thank you!


did_not_have_permission.php - Brandin - 10-22-2017

You cannot override the redirect without making the change in us_helpers...coming in 4.3 will be the ability to override functions in which you will be able to do this without editing us_helpers, but for the time being, did_not_have_permission is meant to do extra items, or change the redirect location, in advance of the redirect that the system has. The reason being: you don't want a user to access a page they have no permission to, and only display a popup they can close...they would then have access...