1
zite83
Setting permissions with own module
  • 2005/2/4 7:26

  • zite83

  • Just popping in

  • Posts: 41

  • Since: 2004/10/5


Hi, I am pretty new with XOOPS as it comes to creating my own modules.. Besides that I have a good understanding on how most of the engine works.. What I would like to know is I have my own module and I would like to set permissions for it.

I do know about going to groups and setting the permissions there, but I would like it so, that a guest user can view the main page of the module, but when they would click lets say on an "Add to Database" link which would bring them to another page for updating a database, how can I make it so it will say "you must be logged in to view this page..."

Pretty much what I am trying to say is, how would I set permissions per page in my module? Or can you point me in the right direction?

Thanks abunch!

2
Dave_L
Re: Setting permissions with own module
  • 2005/2/4 9:14

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


You can add this near the start of the .php file for that page:

is_object($xoopsUser) or redirect_header(XOOPS_URL '/index.php'3_NOPERM);

Login

Who's Online

241 user(s) are online (102 user(s) are browsing Support Forums)


Members: 0


Guests: 241


more...

Donat-O-Meter

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

Latest GitHub Commits