You are here

function _advuser_get_variables in Advanced User 5.2

Same name and namespace in other branches
  1. 5 advuser.module \_advuser_get_variables()
  2. 6.2 advuser.module \_advuser_get_variables()

Get a list of substitution variables for the user account

Parameters

$user the user account:

Return value

An associative array of substitution variables

3 calls to _advuser_get_variables()
advuser_multiple_email_confirm_submit in ./advuser.module
advuser_user_insert in ./advuser.module
Handle user insertion (new users)
advuser_user_update in ./advuser.module
Notify administrator of user profile edit.

File

./advuser.module, line 523
Advanced user module allows you to select users based on an advanced set of filtering and apply actions to block, unblock, delete or email the selected users.

Code

function _advuser_get_variables($user) {
  return array(
    '%user_name' => $user->name,
    '%site' => variable_get("site_name", "drupal"),
    '%uri' => url('user/' . $user->uid, NULL, NULL, TRUE),
    '%user_email' => $user->mail,
    '%user_status' => t($user->status ? 'Active' : 'Blocked'),
    '%user_theme' => empty($user->theme) ? t('DEFAULT') : $user->theme,
    '%user_created' => strftime('%x %X', $user->created),
    '%user_language' => empty($user->language) ? t('DEFAULT') : $user->language,
    '%user_timezone' => empty($user->timezone) ? '0' : "{$user->timezone}",
    '%user_signature' => $user->signature,
    '%google_user' => "http://www.google.com/search?q=%22{$user->mail}%22",
    '%yahoo_user' => "http://search.yahoo.com/search/?p=%22{$user->mail}%22",
  );
}