The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
did_not_have_permission.php
#1
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!
  Reply
#2
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...
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)