Last updated September 27, 2012. Created by mitchell on September 27, 2012.
Log in to edit this page.

Key:

"Name"
* 'id'
* (description)

Properties

"User ID"

  • 'uid'
  • (The unique ID of the user account.)

"Name"

  • 'name'
  • (The login name of the user account.)

"Email"

  • 'mail'
  • (The email address of the user account.)

"URL"

  • 'url'
  • (The URL of the account profile page.)

"Edit URL"

  • 'edit_url'
  • (The url of the account edit page.)

"Last access"

  • 'last_access'
  • (The date the user last accessed the site.)

"Last login"

  • 'last_login'
  • (The date the user last logged in to the site.)

"Created"

  • 'created'
  • (The date the user account was created.)

"User roles"

  • 'roles'
  • (The roles of the user.)

"Status"

  • 'status'
  • (Whether the user is active or blocked.)

"Default theme"

  • 'theme'
  • (The user's default theme.)"

To check if a user is logging in for the first time, check if the 'last_login' property is empty. Here is an example with Rules:

{ "rules_first_login_test" : {
    "LABEL" : "First login test",
    "PLUGIN" : "rule",
    "REQUIRES" : [ "rules" ],
    "USES VARIABLES" : { "user" : { "label" : "User", "type" : "user" } },
    "IF" : [ { "data_is_empty" : { "data" : [ "user:last-login" ] } } ],
    "DO" : [ { "drupal_message" : { "message" : "True" } } ]
  }
}

Looking for support? Visit the Drupal.org forums, or join #drupal-support in IRC.