ShellBanner
System:Linux MiraNet 3.0.0-14-generic-pae #23-Ubuntu SMP Mon Nov 21 22:07:10 UTC 2011 i686
Software:Apache. PHP/5.3.6-13ubuntu3.10
ID:uid=65534(nobody) gid=65534(nogroup) groups=65534(nogroup)
Safe Mode:OFF
Open_Basedir:OFF
Freespace:27.63 GB of 70.42 GB (39.23%)
MySQL: ON MSSQL: OFF Oracle: OFF PostgreSQL: OFF Curl: OFF Sockets: ON Fetch: OFF Wget: ON Perl: ON
Disabled Functions: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,

/ http/ guitar/ modules/ user/ - dr-xr-xr-x

Directory:
Viewing file:     user.tokens.inc (4 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

/**
 * @file
 * Builds placeholder replacement tokens for user-related data.
 */

/**
 * Implements hook_token_info().
 */
function user_token_info() {
  
$types['user'] = array(
    
'name' => t('Users'),
    
'description' => t('Tokens related to individual user accounts.'),
    
'needs-data' => 'user',
  );
  
$types['current-user'] = array(
    
'name' => t('Current user'),
    
'description' => t('Tokens related to the currently logged in user.'),
    
'type' => 'user',
  );

  
$user['uid'] = array(
    
'name' => t('User ID'),
    
'description' => t("The unique ID of the user account."),
  );
  
$user['name'] = array(
    
'name' => t("Name"),
    
'description' => t("The login name of the user account."),
  );
  
$user['mail'] = array(
    
'name' => t("Email"),
    
'description' => t("The email address of the user account."),
  );
  
$user['url'] = array(
    
'name' => t("URL"),
    
'description' => t("The URL of the account profile page."),
  );
  
$user['edit-url'] = array(
    
'name' => t("Edit URL"),
    
'description' => t("The URL of the account edit page."),
  );

  
$user['last-login'] = array(
    
'name' => t("Last login"),
    
'description' => t("The date the user last logged in to the site."),
    
'type' => 'date',
  );
  
$user['created'] = array(
    
'name' => t("Created"),
    
'description' => t("The date the user account was created."),
    
'type' => 'date',
  );

  return array(
    
'types' => $types,
    
'tokens' => array('user' => $user),
  );
}

/**
 * Implements hook_tokens().
 */
function user_tokens($type$tokens, array $data = array(), array $options = array()) {
  
$url_options = array('absolute' => TRUE);
  if (isset(
$options['language'])) {
    
$url_options['language'] = $options['language'];
    
$language_code $options['language']->language;
  }
  else {
    
$language_code NULL;
  }
  
$sanitize = !empty($options['sanitize']);

  
$replacements = array();

  if (
$type == 'user' && !empty($data['user'])) {
    
$account $data['user'];
    foreach (
$tokens as $name => $original) {
      switch (
$name) {
        
// Basic user account information.
        
case 'uid':
          
// In the case of hook user_presave uid is not set yet.
          
$replacements[$original] = !empty($account->uid) ? $account->uid t('not yet assigned');
          break;

        case 
'name':
          
$name format_username($account);
          
$replacements[$original] = $sanitize check_plain($name) : $name;
          break;

        case 
'mail':
          
$replacements[$original] = $sanitize check_plain($account->mail) : $account->mail;
          break;

        case 
'url':
          
$replacements[$original] = !empty($account->uid) ? url("user/$account->uid"$url_options) : t('not yet assigned');
          break;

        case 
'edit-url':
          
$replacements[$original] = !empty($account->uid) ? url("user/$account->uid/edit"$url_options) : t('not yet assigned');
          break;

        
// These tokens are default variations on the chained tokens handled below.
        
case 'last-login':
          
$replacements[$original] = !empty($account->login) ? format_date($account->login'medium'''NULL$language_code) : t('never');
          break;

        case 
'created':
          
// In the case of user_presave the created date may not yet be set.
          
$replacements[$original] = !empty($account->created) ? format_date($account->created'medium'''NULL$language_code) : t('not yet created');
          break;
      }
    }

    if (
$login_tokens token_find_with_prefix($tokens'last-login')) {
      
$replacements += token_generate('date'$login_tokens, array('date' => $account->login), $options);
    }

    if (
$registered_tokens token_find_with_prefix($tokens'created')) {
      
$replacements += token_generate('date'$registered_tokens, array('date' => $account->created), $options);
    }
  }

  if (
$type == 'current-user') {
    
$account user_load($GLOBALS['user']->uid);
    
$replacements += token_generate('user'$tokens, array('user' => $account), $options);
  }

  return 
$replacements;
}
Command:
Quick Commands:
Upload:
[Read-Only] Max size: 100MB
PHP Filesystem: <@ Ú
Search File:
regexp
Create File:
Overwrite [Read-Only]
View File:
Mass Defacement:
[+] Main Directory: [+] Defacement Url:
LmfaoX Shell - Private Build [BETA] - v0.1 -; Generated: 0.2206 seconds