Drupal 7.x User object reference Guide

Submitted by admin on Wed, 10/05/2016 - 14:08

$user->uid                            User ID
$user->name                      User name
$user->pass                          Encrypted password
$user->mail                          User email address
$user->theme                      (?) Name of the theme shown for this user (no longer changeable in core but can be in contrib)
$user->signature                  Signature as set in the user account settings
$user->signature_format      Text format to apply to signature
$user->created                      Unix timstamp for when the account was created
$user->access                      Unix timstamp of the last time the user accessed the site
$user->login                          (?) Unix timstamp of the last time the user logged in
$user->status                      1 if the user is active, 0 if blocked
$user->timezone                  User's timezone, if user selectable timezones are enabled
$user->language                  User's language code
$user->picture                      User picture / avatar
$user->init                          (?) Contains the user's email
$user->data                          (?)
$user->sid                          (?) Session ID
$user->ssid                          (?)
$user->hostname                  User's IP address
$user->timestamp              (?)
$user->cache                      (?)
$user->session                      (?) Variables stored in the session
$user->roles                      Array of roles assigned to the user