You are here

public function SimpleLdapUserMap::getFormOptions in Simple LDAP 7

Generate a list of attribute names from the attribute map for use in forms. This pulls from the schema to make the human-readable version have the right case.

File

simple_ldap_user/SimpleLdapUserMap.class.php, line 78
Class defining the LDAP <-> Drupal user field mappings.

Class

SimpleLdapUserMap
@file Class defining the LDAP <-> Drupal user field mappings.

Code

public function getFormOptions() {
  $options = array();
  foreach ($this->map as $attribute) {
    $key = $attribute['ldap'];
    $schema = $this
      ->getAttributeSchema($key);
    $options[$key] = $schema['name'];
  }
  asort($options);
  return $options;
}