|
|||
|
Hello,
I've just made an Auth system, and when a user is logged in I can use all the variables stored in an stdClass. But, I want more... I want to have a "login history" so I can track from wich IP a user logged in last and at what date and time, actually all the other user related info. So I store all that data in a table called users_auth_history and every record is a login. Getting the data in the database is nothing. But getting it out and being able to add it to the already existing user information collected by these two functions: PHP Code:
Thanks, Jasper |
|
||||
|
well getIdentity() can return a class with all the data in it.
so you would access it like getIdentity()->getLastLogin() etc..... sorry about the vagueness, I'm in a hurry
__________________
SpotSec Network Gateway Project on SourceForge SpotSec Network Gateway Project Home SpotSec Blog: http://spotsec.com/blog |
|
|||
|
i use this code for authorization. it needs to be refactored and documented for the production version, but may give you some ideas.
one key here is that it allows you to store multiple roled per session. i have users who are also members. this allows them to be logged into admin and their member account at the same time, without ever granting a member access to admin. one other key is the utility role, registeredUser. this is helpfull for when you want to save some information about a site visitor for a few. PHP Code:
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|