1
nmshah
Redirection in case user does not have permission
  • 2007/12/12 18:51

  • nmshah

  • Just can't stay away

  • Posts: 556

  • Since: 2007/7/2 8


In my site smartsection, webshow, wflinks are some of the modules i use. In all these modules submit permission are available for registered users only. The problem is that when a non-registered user clicks on these links he sees a msg that he does not have permission to post in this category and is redirected to the index page of the module. What i want is the user to be redirected to the user.php page. How should i do this?

2
mjoel
Re: Redirection in case user does not have permission
  • 2007/12/12 20:01

  • mjoel

  • Quite a regular

  • Posts: 325

  • Since: 2006/12/9


in all the modules check the submit.php file

you will find a line something like this,

redirect_header("index.php", 1, _NOPERM);

edit:
change the "index.php" to XOOPS_URL."/user.php"

redirect_header(XOOPS_URL."/user.php", 1, _NOPERM);

3
nmshah
Re: Redirection in case user does not have permission
  • 2007/12/12 20:40

  • nmshah

  • Just can't stay away

  • Posts: 556

  • Since: 2007/7/2 8


on changing the above code, i get the following error

"The requested URL /modules/smartsection/user.php was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. "


i think thats because the redirection is now towards http://makingdestiny.com/modules/smartsection/user.php rather then http://makingdestiny.com/user.php

4
nmshah
Re: Redirection in case user does not have permission
  • 2007/12/12 20:51

  • nmshah

  • Just can't stay away

  • Posts: 556

  • Since: 2007/7/2 8


Solved

instead of replacing "index.php" with "user.php" replace "index.php" with "../../user.php" in the above said line.

Login

Who's Online

319 user(s) are online (273 user(s) are browsing Support Forums)


Members: 0


Guests: 319


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits