Best PHP class (or PHP/Ruby/Python framework) for user management?

somlor

New member
Oct 29, 2007
122
12
0
Anyone have experience with a decent PHP user management class ... or even a PHP/Ruby/Python framework with really solid, well thought out user management?

I have all these little apps I've thrown together over the years that I use internally. Would love to launch some as SAAS type webapps but I'm not a confident enough programmer yet (and too lazy) to try to build my own secure user management from scratch.

Ideally I'm looking for a simple and secure PHP class that doesn't try to take over my entire app and handles things like:
  • user registration (preferably with option to just use email + password, without requiring username)
  • email verification
  • lost password
  • change password
  • access levels
  • user groups
  • protected pages
  • etc.

At this point I'd even be willing to switch to a PHP/Ruby/Python framework if user management is just amazing out of the box.

tumblr_l2dt62VWiI1qzdgljo1_500.jpg


Thanks,
Sean
 


You'd have to tie the pieces together, but the zend framework can handle all the heavy lifting for you.
 
this is why i like django -- on the whole, it's just another python framework, and will let you do anything that you can do in another framework, but out of the box, it comes with excellent user support (everything you ask for) and admin pages, if you choose to use them.
 
  • Like
Reactions: somlor
this is why i like django -- on the whole, it's just another python framework, and will let you do anything that you can do in another framework, but out of the box, it comes with excellent user support (everything you ask for) and admin pages, if you choose to use them.

Tell me more Mr. Lee. Django has scaffolding (for lack of better words) for that stuff? Authorization, acls, etc?
 
I would vote django too but if you prefer PHP then CakePHP - it supports scaffolding, auth, acls, permissions... quite easy to learn if you know MVC (Model-View-Controller).
 
Tell me more Mr. Lee. Django has scaffolding (for lack of better words) for that stuff? Authorization, acls, etc?

whoa buddy, how you know my name? have we met?
django.contrib (which is a builtin library, distributed with the main django framework, that encompasses all the optional community-contributed packages) has the excellent "auth" library that handles authorization (logins, password resets/changes, and registration, but FYI there's no default form/page for registration, you code the HTML yourself and hook it up to their registration methods) and definitely supports ACL and groups.

the other package worth mentioning, the one that really gives me wood, is django.contrib.admin, which gives you an admin backend with full add/edit/delete pages for every model you define (models tie to database tables, so the end effect is something like PHPMyAdmin, but with better support for object relations and foreign keys).

so if you use django.contrib.auth along with django.contrib.admin, you get user registration, authentication and management, password protected pages, and an admin panel to add/edit/delete users and groups.
all of this can be enabled by uncommenting ~5-6 lines in a couple configuration files from a fresh django project, and takes me about 35 seconds to complete when i'm starting a new project.
 
whoa buddy, how you know my name? have we met?
django.contrib (which is a builtin library, distributed with the main django framework, that encompasses all the optional community-contributed packages) has the excellent "auth" library that handles authorization (logins, password resets/changes, and registration, but FYI there's no default form/page for registration, you code the HTML yourself and hook it up to their registration methods) and definitely supports ACL and groups.

the other package worth mentioning, the one that really gives me wood, is django.contrib.admin, which gives you an admin backend with full add/edit/delete pages for every model you define (models tie to database tables, so the end effect is something like PHPMyAdmin, but with better support for object relations and foreign keys).

so if you use django.contrib.auth along with django.contrib.admin, you get user registration, authentication and management, password protected pages, and an admin panel to add/edit/delete users and groups.
all of this can be enabled by uncommenting ~5-6 lines in a couple configuration files from a fresh django project, and takes me about 35 seconds to complete when i'm starting a new project.

Wow didn't realize django did all that. You're making me want to learn python now.

Your sig made me put 2 and 2 together. I've met you irl with the a4d crew at ASW.
 
Wow didn't realize django did all that. You're making me want to learn python now.

Your sig made me put 2 and 2 together. I've met you irl with the a4d crew at ASW.

Python: Now accepting all converts. Join the dark side! Taste the power!
Sincerely,
Your friendly neighborhood priest of all things python
 
uplinked said:
so if you use django.contrib.auth along with django.contrib.admin, you get user registration, authentication and management, password protected pages, and an admin panel to add/edit/delete users and groups.
all of this can be enabled by uncommenting ~5-6 lines in a couple configuration files from a fresh django project, and takes me about 35 seconds to complete when i'm starting a new project.
+1. Thanks, this sounds perfect.

Would you mind sharing the steps you take in that 35 seconds? Python/Django are both almost completely new to me so it would be cool to know at least I am starting off on the right foot.

In any case, more boobs.

Jenya-D-Amazing-Nude-Pictures.jpg

tumblr_l2n6b3oLev1qzdgljo1_500.jpg

tumblr_l2n5qawTlo1qzdgljo1_500.jpg
 
on my local box, i'm running ubuntu 9.10 with python 2.6, but deleted django for the purpose of this... here's the full setup, start to finish

most of this is just uncommenting lines that are commented, and filling in db info, so 90% of the work i'll do using `sed`. feel free to emulate the steps in a text editor.
Code:
# install django
mkdir src && cd src && svn co http://code.djangoproject.com/svn/django/trunk/ django && cd django && sudo python setup.py install && cd ~

#make an app
django-admin.py startproject proj && cd proj
chmod +x manage.py

# setup db
sed -i "s/backends\./backends.sqlite3/" settings.py
sed -i "s/NAME': ''/NAME': 'db.sqlite3'/" settings.py

# i like to change the admin_media_prefix
sed -i "s/ADMIN_MEDIA_PREFIX = '\/media\/'/ADMIN_MEDIA_PREFIX = '\/admin-media\/'/" settings.py

# enable admin module
sed -i "s/# \('django.contrib.admin'\)/\1/" settings.py

# uncomment the relevant sections in urls.py
sed -i "s/# from/from/" urls.py
sed -i "s/# admin/admin/" urls.py
sed -i 's/# \([^ ]*admin\/\)/\1/' urls.py
# sync your db to enable your first user account
./manage.py syncdb
# start your server
./manage.py runserver 0.0.0.0:8080
navigate to http://localhost:8080/admin and you're good to go! setup some users, make a group, etc.




MOAR!
 
navigate to http://localhost:8080/admin and you're good to go! setup some users, make a group, etc.

Page not found message on the above link.

Just kidding :) I'm in the middle of a Zend PHP Framework learning curve and not gaining as fast as I thought. This is my first round with MVC and it's not clicking with me so far. Hopefully will turn the corner tonight.

+rep for taking the time to show the way of the mighty Python.
 
Sweeet, thanks man.

Wow, between your guide here and this post I've got a complete test up and running, with pages for registration, login, password reset, etc. in under an hour.

tumblr_kuays3VVvG1qzdgljo1_500.jpg
 
  • Like
Reactions: uplinked