Welcome Guest, Not a member yet? Register   Sign In
Created my own basic login/auth system based on datamapper example script
#1

[eluser]Andy78[/eluser]
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

#2

[eluser]Andy78[/eluser]
Anybody downloaded it yet? maybe I should put it on bitbucket?
#3

[eluser]Anes P.A[/eluser]
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
#4

[eluser]Anes P.A[/eluser]
[quote author="Anes P.A" date="1339155591"]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[/quote]
#5

[eluser]Andy78[/eluser]
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.
#6

[eluser]shenanigans01[/eluser]
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
#7

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




Theme © iAndrew 2016 - Forum software by © MyBB