You are here

function theme_ldapdata_ldap_attribute in LDAP integration 6

Same name and namespace in other branches
  1. 5.2 ldapdata.module \theme_ldapdata_ldap_attribute()
  2. 5 ldapdata.module \theme_ldapdata_ldap_attribute()

Theme functon for the LDAP attribute.

1 theme call to theme_ldapdata_ldap_attribute()
_ldapdata_user_view in ./ldapdata.module
Implements hook_user() view operation.

File

./ldapdata.theme.inc, line 49
Themes for ldapdata module.

Code

function theme_ldapdata_ldap_attribute($value, $type) {
  switch ($type) {
    case 'url':
      $ret = strpos($value, '://') ? $value : "http://{$value}";
      $ret = "<a href=\"{$ret}\">{$ret}</a>";
      break;
    case 'txt':
    default:
      $ret = $value;
      break;
  }
  return $ret;
}