Closed (fixed)
Project:
First login
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
26 Jul 2012 at 08:49 UTC
Updated:
10 Aug 2012 at 14:16 UTC
Hey I am wondering if there is any reason, why you not simply check if $account->access is zero - which should tell you if the user has logged in previously?
So like this:
function mymodule_user_login(&$edit, $account) {
if($account->access == 0){
//first access
drupal_set_message('Welcome!');
}
}
Comments
Comment #1
afox commentedWell, that is true for the very first login. But if we need to do something for more than just the very first, then we don't have a way anymore. And also, I think access is updated even if a user is say, blocked and tries to login, or in some other similar cases.