EllisLab text mark
Advanced Search
     
Created my own basic login/auth system based on datamapper example script
Posted: 07 June 2012 08:13 PM   [ Ignore ]
Joined: 2010-10-27
114 posts

I use datamapper with all my CI web apps so didn’t want to use one of the existing auth library’s also I am interested in improving my skills so decided to build one myself.

Basically I am looking for somebody to look over my code and see if I have missed anything and also offer improvement advice. You are also free to use it.

It uses the datamapper example login_manager library as its core but I have added functionality to handle the following:

Forgotten passwords: Password_reset controller. User enters their registered email address and if the user exists a new random password is generated and sent to the email address.

User registration and activation: registration controller. The user registers by entering their details. A conformation email is sent to user with a link back to the registration/activate function containing an activation code if the code matches the user is activated. Also checks if the user has previously activated their account.

Existing users can change their passwords: update_password controller.

Login remember me functionality added to the library.

Both front end and an admin login page.

Database includes the following tables: users, user_profiles, user_types

I think I have covered all the basics for a login/ basic auth system.

I have included my full CI installation and an sql file to recreate the database. There is no styling or anything with this just plain views to be styled anyway you want.

Both users, andy91 and andy78 both have the password test1234.

Take a look and let me know if I have left any gaping security holes.

http://www.smallfiles.org/download/709/base.zip.html

 
Posted: 08 June 2012 07:05 AM   [ Ignore ]   [ # 1 ]   [ Rating: 0 ]
Joined: 2010-10-27
114 posts

Anybody downloaded it yet? maybe I should put it on bitbucket?

 
Posted: 08 June 2012 07:39 AM   [ Ignore ]   [ # 2 ]   [ Rating: 0 ]
Joined: 2009-09-25
14 posts

Hi Andy,
I am Anes, downloaded your code and work the login process . But where is the logout
functionality ? Do you please provide a provision for same ...

Thanks
Anes

 
Posted: 08 June 2012 07:45 AM   [ Ignore ]   [ # 3 ]   [ Rating: 0 ]
Joined: 2009-09-25
14 posts
Anes P.A - 08 June 2012 07:39 AM

Hi Andy,
I am Anes, downloaded your code and work the login process . But where is the logout
functionality ? Do you please provide a provision for same ... You can contact
me at anes.pa(@)gmail.com and can call : +91 9747972826, I expect to work with you
for a good IGNITING , Cheers

Thanks
Anes

 
Posted: 08 June 2012 08:52 AM   [ Ignore ]   [ # 4 ]   [ Rating: 0 ]
Joined: 2010-10-27
114 posts

the logout functionality is simply: yoursite/index.php/logout

put a link to the logout controller anywhere in the site and it will log you out.

 
Posted: 15 June 2012 02:42 PM   [ Ignore ]   [ # 5 ]   [ Rating: 0 ]
Joined: 2009-05-14
46 posts

Hey Andy78, Like you I am / plan on using datamapper for most of my projects so this is a huge help. I’d be interested to know if you’ve received any feedback per improvements / security holes. I’ve given it a download and I plan on checking it out later on this week! Thanks smile

 
Posted: 19 October 2012 01:03 AM   [ Ignore ]   [ # 6 ]   [ Rating: 0 ]
Joined: 2012-10-17
4 posts

Download link is not working
http://www.smallfiles.org/download/709/base.zip.html
from where to download..??