It looks that what you're trying to do implement (= do a data comparison with "never") is not an obvious thing to do. Therefor, you may want to go for a plan-b that, for sure, will implement what you're trying to achieve, i.e. "... redirect on a special page for first time after login ..." (as in your question). Read on for more details.
Create a custom rule that looks like so (in Rules export format, use the Rules UI to import it in your own site):
{ "rules_redirect_new_users_to_special_page" : {
"LABEL" : "Redirect new users to special page",
"PLUGIN" : "reaction rule",
"OWNER" : "rules",
"REQUIRES" : [ "rules" ],
"ON" : { "user_login" : [] },
"IF" : [
{ "NOT user_has_role" : { "account" : [ "account" ], "roles" : { "value" : { "4" : "4" } } } }
],
"DO" : [
{ "user_add_role" : { "account" : [ "account" ], "roles" : { "value" : { "4" : "4" } } } },
{ "redirect" : { "url" : "welcome\/newuser" } }
]
}
}
Some details about this rule:
- Rules Event: User has logged in.
- Rules Condition: User does NOT (!!!) have a role with role id = "
4
".
- Rules Action:
- Grant User the role with role id = "
4
".
- Perform a page redirect to relative path
welcome/newuser
.
So this rule checks if a user does not yet have some (designated) role with role id = "4
" (adapt to whatever role id that fits your case, and make sure this role is NOT yet granted when activating a new user id). If that's the case then the user is granted that role, followed by a page redirect to relative path welcome/newuser
(adapt to whatever path that fits your case). Obviously, next time a user performs a login again, the Rules Condition will no longer be TRUE, and no more redirect will be performed.
Pretty similar to "... redirect on a special page for first time after login ..." (as in your question), no?
Variation
What is explained before in this answer, does require some extra (dedicate) role. If you rather want to keep the number of roles in your site to a minimum, you could also use the Flag module (as an alternative for such extra role). Some more details about this variation:
- Define a "global" flag to flag users
- Replace the Rules Condition (to check for the dedicated role), by another one like "Check if the user is NOT flagged" (by the global flag).
- Replace the Rules Action (to grant the dedicated role), by another one like "Flag this user flagged" (by the global flag).
Voilà ... use the solution you prefer, either one will do ...