Tuesday, October 20, 2009

Custom Authentication

Howdy all,

I'm brand new to CakePHP (and MVC frameworks for that matter), but
perfectly comfortable with php and mysql.

For a number of years I have hand written and reused my own
authentication systems, which have worked fantastically for me. Now
that I've found the benefit of CakePHP, I'd really like to recreate my
way of doing authentications.

My question:
I'll give a short summary below as to how I go about doing it, but my
question is this: does anyone have a good tutorial or write up they
know of that I could follow for overwriting the existing auth system
with my own with the least amount of effort?

---

How I like to do authentications:
Users of course have an ID, username and hashed pass, which is checked
on a login attempt and set up in the sessions. They also have a user
level, ranking them numerically (in most cases, I use 1-5, or 1-10...
the higher you are, the more rights you have)... this includes 0 for
guests, 1 for users who are registered but have not been authenticated
(depending on if the system has admin or e-mail authentication turned
on), and 2+ for everyone else. Most of my pages have a numerical
value indicating the required level to enter (for example, if it were
3... all users level three and up could enter), though some instead
use an array and a numerical value (for exceptions... so 3 is the
numeral, but in the array 5 is false... then everyone 3+ except level
5 users have access). I like this system because it allows me to have
precise controll over which groups access, without having to manage in
fine detail every last thing (because of the numerical value, most
pages require that only and they are ready to go). The global
function also lets me use this same check for things like menu items
(register, admin panel, etc.).

Thanks,
x.o.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate