1
georgev
User Authentication in other pages...
  • 2005/3/23 14:25

  • georgev

  • Just popping in

  • Posts: 4

  • Since: 2005/3/23


hello...
i've XOOPS and a seperate script for some downloads...
how can i add xoop's authentication system to the other script?
which file i must include so only registered users can access the other script?
thanks in advance

2
ackbarr
Re: User Authentication in other pages...

include this snippet at the header:
include('mainfile.php'); //change to correct path to mainfile.php

//Check that the current person is logged in:
if (! $xoopsUser) {
  
//User is not logged in
  
redirect_header(XOOPS_URL.'/user.php'3_NOPERM);
  exit();
}

redirect_header takes 3 parameters:
1. The url to go to
2. the number of seconds to display the message page
3. the message that should be displayed - this one tells the user they have no permission to access the current page.

3
georgev
Re: User Authentication in other pages...
  • 2005/3/23 15:15

  • georgev

  • Just popping in

  • Posts: 4

  • Since: 2005/3/23


it worked fine, thanks :)

Login

Who's Online

311 user(s) are online (58 user(s) are browsing Support Forums)


Members: 0


Guests: 311


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