4WebHelp
 FAQ  •  Search  •  User Groups  •  Forum Admins  •  Smilies List  •  Statistics  •  Rules   •  Login   •  Register
Toggle Navigation Menu

 PHP: User Authentication
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic
Author Message
Darren
Team Member



Joined: 05 Feb 2002
Posts: 549
Location: London

PostPosted: Tue Jan 21, 2003 3:41 pm (21 years, 3 months ago) Reply with QuoteBack to Top

Can anyone recommend a good user authentication script/class/functions to password protect an area of a site.

should feature:

- users register themselves.
- should confirm email addresses either by sending the password to their email of activating via a link in an email
- sends forgotten passwrods to email
- ability to change password (esp. if auto generated)
OfflineView User's ProfileFind all posts by DarrenSend Personal MessageVisit Poster's Website
Daniel
Team Member



Joined: 06 Jan 2002
Posts: 2564

PostPosted: Tue Jan 21, 2003 5:29 pm (21 years, 3 months ago) Reply with QuoteBack to Top

Your requirements are all filled by phpBB, even though it's not really meant as an authentification script!

What you would do is set up a phpBB "enabled" page (which loads all phpBB's functions), and then check to see if the user is logged in. If you only want to allow certain users, you'd use something like this:

Code:
if ($userdata['username']=='Username1' || $userdata['username']=='Username2') {
// Do successfull login stuff
}
else {
// Do failed login stuff
}


This is just rough, but let me know if you're interested, and I can develop it more. I'm not sure if this is for Fancy Rats, so I'm not sure if it's appropriate. If it is then it'll make it much easier by only having one database.

________________________________
Image
OfflineView User's ProfileFind all posts by DanielSend Personal Message
Darren
Team Member



Joined: 05 Feb 2002
Posts: 549
Location: London

PostPosted: Tue Jan 21, 2003 5:47 pm (21 years, 3 months ago) Reply with QuoteBack to Top

Firstly, the reason I asked was for another website that won't be using phpBB, so I'd still be interested in alternatives.

I'm currently looking at this:
http://sourceforge.net/projects/authclassed/
and whilst I have managed to get it working the documentaion and examples are a bit sparse. Its not quite the out of the box solution I was hoping for.

Secondly, I would be interested in using the phpBB login for Fancy Rats so if you feel like developing a tutorial I'd certainly use it Wink if not I'll know where to come to ask questions when I get around to doing it. Very Happy
OfflineView User's ProfileFind all posts by DarrenSend Personal MessageVisit Poster's Website
Daniel
Team Member



Joined: 06 Jan 2002
Posts: 2564

PostPosted: Tue Jan 21, 2003 5:53 pm (21 years, 3 months ago) Reply with QuoteBack to Top

OK, but what kind of tutorial would you be interested in for phpBB? Having a page which only users registered at the forums can access? Or a page which only certain users registered at the forums can access?

________________________________
Image
OfflineView User's ProfileFind all posts by DanielSend Personal Message
Darren
Team Member



Joined: 05 Feb 2002
Posts: 549
Location: London

PostPosted: Tue Jan 21, 2003 6:10 pm (21 years, 3 months ago) Reply with QuoteBack to Top

Most useful to me would be to be able to give registered users extra functionality on certain pages.

Take for example my E-Pals page I'd like that to be an extension to the user profile where by registered users could add/edit/remove their details where as a guest would just have be able to read them.

Thats probably more complicated than you were expecting Wink I was going to wait until 2.2 before I bothered to work it out
OfflineView User's ProfileFind all posts by DarrenSend Personal MessageVisit Poster's Website
Daniel
Team Member



Joined: 06 Jan 2002
Posts: 2564

PostPosted: Tue Jan 21, 2003 6:16 pm (21 years, 3 months ago) Reply with QuoteBack to Top

Well you could just code all the add/edit/remove stuff seperately from phpBB, but using the phpBB functions and database abstraction layer, and then add an if clause (if $userdata['session_logged_in'] or something like that) to only give these options to registered users... You could store the records in a table using $userdata['username'] in the username field.

I can't really write a tutorial on that because it's too specific Sad.

________________________________
Image
OfflineView User's ProfileFind all posts by DanielSend Personal Message
jayant
Team Member



Joined: 07 Jan 2002
Posts: 262
Location: New Delhi, India

PostPosted: Tue Jan 21, 2003 6:19 pm (21 years, 3 months ago) Reply with QuoteBack to Top

PHPClasses.org has many classes there.

________________________________
Jayant Kumar
Member of the 4WebHelp Team
Nibble Guru - Computing Queries Demystified
GZip/ Page Compression Test
OfflineView User's ProfileFind all posts by jayantSend Personal MessageVisit Poster's WebsiteYahoo MessengerMSN Messenger
roger07
Junior WebHelper
Junior WebHelper


Joined: 10 Sep 2003
Posts: 1

PostPosted: Wed Nov 05, 2003 11:48 am (20 years, 5 months ago) Reply with QuoteBack to Top

Hello Darren,
I found your below mentioned query. I have a similar query. Please let me know How you accomplished your task.
Regards,
Roger



Darren wrote:
Can anyone recommend a good user authentication script/class/functions to password protect an area of a site.

should feature:

- users register themselves.
- should confirm email addresses either by sending the password to their email of activating via a link in an email
- sends forgotten passwrods to email
- ability to change password (esp. if auto generated)

________________________________
Urgent: Please tell where to find LOGIN SCRIPT to give website access to registered users. And also how to make registration possible online. God Bless you all as you are here to help.
OfflineView User's ProfileFind all posts by roger07Send Personal MessageSend emailYahoo Messenger
Darren
Team Member



Joined: 05 Feb 2002
Posts: 549
Location: London

PostPosted: Wed Nov 05, 2003 12:58 pm (20 years, 5 months ago) Reply with QuoteBack to Top

Hi,
I can barely remember which project this was for it was so long ago. I believe in the end it was decided that individual user accounts were not required and that simply sending people a hardcoded password to the email address they specified was sufficient. It was more about collecting contact details of interested people than anything else.
Sorry thats not going to be of any help to you.
OfflineView User's ProfileFind all posts by DarrenSend Personal MessageVisit Poster's Website
Display posts from previous:      
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic


 Jump to:   




You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot edit your posts in this forum.
You cannot delete your posts in this forum.
You cannot vote in polls in this forum.


Page generation time: 0.128279 seconds :: 19 queries executed :: All Times are GMT
Powered by phpBB 2.0 © 2001, 2002 phpBB Group :: Based on an FI Theme