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
/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
haha got the redirect working right
#1
alright after making a custom redirect script lol i have another question now the users name at the top is there a way to script that so if they have the proper permissions it will redirect to the correct user page vs the generic user page

http://prntscr.com/ef5127
  Reply
#2
You could handle that one of 2 ways...either you could edit navigation.php (which could get written with updates), or the better way to do it would be to copy the default account page over to usersc/account.php, change the init to ../users/init.php at the top of that page. Then just below that, write a script to redirect people to the right place based on permissions just like you did for the other thing. In this situation, it would try to send them to the account.php but they would immediately be redirected. They won't even notice.
  Reply
#3
You could handle that one of 2 ways...either you could edit navigation.php (which could get written with updates), or the better way to do it would be to copy the default account page over to usersc/account.php, change the init to ../users/init.php at the top of that page. Then just below that, write a script to redirect people to the right place based on permissions just like you did for the other thing. In this situation, it would try to send them to the account.php but they would immediately be redirected. They won't even notice.
  Reply
#4
hm seems simpleenough i was tinkering with setting the navigation to redirect it to the custom script and it just sorta crashed lol ill try that second one out seems simpler in the end
  Reply
#5
Yeah. I do that on a lot of my apps. It works well and I don't even notice it.
  Reply
#6
that was super simple i like that lol so if i was to say abandon all your ready made pages i just copy that head code for the that i edited the require once part to any page i want i was debating about redoing the majority of the pages so i could add in iframes for the side fixed menu and top header

  Reply
#7
weird i get a redirect error for too many redirects for anything but admin ... werid
  Reply
#8
hah solved it lol probally not at all right but it stoped with the redirect to many times i added my admin redirect to the account page in users and it works just fine now strange
  Reply
#9
Yeah. It sounds like you were redirecting somewhere that the user did not have permission to go, so it was redirecting back.
  Reply
#10
trial and error is the best way to learn i think
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)