You are here

function ldap_server_tokens_needed_for_template in Lightweight Directory Access Protocol (LDAP) 7

Parameters

string $template in form [cn]@myuniversity.edu:

Return value

array of all tokens in the template such as array('cn')

2 calls to ldap_server_tokens_needed_for_template()
ldap_profile_user_login in ldap_profile/ldap_profile.module
Implements hook_user_login().
ldap_server_token_replace in ldap_servers/ldap_servers.functions.inc

File

ldap_servers/ldap_servers.functions.inc, line 313
collection of functions that don't belong in server object

Code

function ldap_server_tokens_needed_for_template($template, $pre = LDAP_SERVERS_TOKEN_PRE, $post = LDAP_SERVERS_TOKEN_POST) {
  preg_match_all('/
    \\[             # [ - pattern start
    ([^\\[\\]]*)  # match $type not containing whitespace : [ or ]
    \\]             # ] - pattern end
    /x', $template, $matches);
  return @$matches[1];
}