You are here

function ldap_feeds_drupal_user_attributes in Lightweight Directory Access Protocol (LDAP) 7.2

Same name and namespace in other branches
  1. 8.2 ldap_feeds/ldap_feeds.module \ldap_feeds_drupal_user_attributes()
  2. 7 ldap_feeds/ldap_feeds.module \ldap_feeds_drupal_user_attributes()
2 calls to ldap_feeds_drupal_user_attributes()
FeedsDrupalUserLdapEntryFetcher::configDefaults in ldap_feeds/FeedsDrupalUserLdapEntryFetcher.inc
Override parent::configDefaults().
FeedsDrupalUserLdapEntryFetcherResult::__construct in ldap_feeds/FeedsDrupalUserLdapEntryFetcher.inc
Constructor.

File

ldap_feeds/ldap_feeds.module, line 78

Code

function ldap_feeds_drupal_user_attributes() {
  $attributes = [
    'uid' => [
      'token' => 'drupal.uid',
      'description' => 'Drupal used id.  e.g. 413',
    ],
    'name' => [
      'token' => 'drupal.name',
      'description' => 'Drupal username.  e.g. jdoe',
    ],
    'mail' => [
      'token' => 'drupal.mail',
      'description' => 'Drupal email address.  e.g. jdoe@gmail.com',
    ],
    'created' => [
      'token' => 'drupal.created',
      'description' => 'Drupal account created timestamp in unix e.g. 432432432',
    ],
    'status' => [
      'token' => 'drupal.status',
      'description' => 'Drupal user status  e.g. 1 or 0',
    ],
    'language' => [
      'token' => 'drupal.language',
      'description' => 'Drupal language.',
    ],
    'signature' => [
      'token' => 'drupal.signature',
      'description' => 'Drupal signature.  e.g. Happy Joe',
    ],
    'login' => [
      'token' => 'drupal.login',
      'description' => 'Drupal unix timestamp of last login  e.g. 1317494439',
    ],
    'init' => [
      'token' => 'drupal.init',
      'description' => 'Drupal user init  e.g. jdoe@gmail.com',
    ],
  ];

  // ldap_authentication and some other modules may want to add additional drupal user tokens
  // largely derived from the $user->data array, but possibly from related data such as authmaps
  // some use cases for alter are simply edge cases.
  drupal_alter('ldap_feeds_drupal_user_attributes', $attributes);
  return $attributes;
}