Welcome Guest, Not a member yet? Register   Sign In
Storing login and logout time
#7

[eluser]skunkbad[/eluser]
[quote author="Aqsa Jamil" date="1346664159"]I want to implement a functionality to create profile for the newly registered user. for that i need to check log-in and log-out time in order to determine if the user is newly registered user or not, if login and logout time is NULL then the create profile interface will be displayed for that user to create profile. if Not NULL then user will be redirected to some other page
Can any one give me some idea about how to write code in Model and Controller for that???[/quote]

When you create the user, your insert data will not include a field that is defaulted in the table. For instance, if you have a user table the field could be 'new', and the value could default to '1'. When the user finally fills out their profile, the update would set it to '0'. This is super easy. If you can't figure this out by yourself, then you should re-read the entire section on database interactions, models, and controllers in the user guide. If that doesn't help, you may need to spend some time learning basic PHP.

You also might want to check out my Community Auth application. It provides a lot of working examples, and also a complete and tested user authentication library.


Messages In This Thread
Storing login and logout time - by El Forum - 09-02-2012, 10:43 PM
Storing login and logout time - by El Forum - 09-02-2012, 11:00 PM
Storing login and logout time - by El Forum - 09-03-2012, 02:22 AM
Storing login and logout time - by El Forum - 09-03-2012, 04:49 AM
Storing login and logout time - by El Forum - 09-03-2012, 08:09 PM
Storing login and logout time - by El Forum - 09-03-2012, 09:50 PM
Storing login and logout time - by El Forum - 09-03-2012, 11:01 PM



Theme © iAndrew 2016 - Forum software by © MyBB