Révision 32700c57
Ajouté par Assos Assos il y a environ 5 ans
drupal7/sites/all/modules/ldap/ldap_authentication/ldap_authentication.admin.inc | ||
---|---|---|
6 | 6 |
*/ |
7 | 7 |
|
8 | 8 |
/** |
9 |
* form for adding, updating, and deleting a single ldap authorization mapping |
|
9 |
* Form for adding, updating, and deleting a single ldap authorization mapping. |
|
10 |
* |
|
11 |
* @param mixed $form |
|
12 |
* @param mixed $form_state |
|
10 | 13 |
* |
11 |
* @param <type> $form |
|
12 |
* @param <type> $form_state |
|
13 | 14 |
* @return array drupal form array |
14 | 15 |
*/ |
15 | 16 |
function ldap_authentication_admin_form($form, &$form_state) { |
16 |
ldap_servers_module_load_include('php', 'ldap_authentication', 'LdapAuthenticationConfAdmin.class');
|
|
17 |
$auth_conf = new LdapAuthenticationConfAdmin();
|
|
18 |
return $auth_conf->drupalForm();
|
|
17 |
ldap_servers_module_load_include('php', 'ldap_authentication', 'LdapAuthenticationConfAdmin.class'); |
|
18 |
$auth_conf = new LdapAuthenticationConfAdmin(); |
|
19 |
return $auth_conf->drupalForm(); |
|
19 | 20 |
} |
20 | 21 |
|
21 |
|
|
22 | 22 |
/** |
23 |
* validate handler for the ldap_authentication_admin_form
|
|
23 |
* Validate handler for the ldap_authentication_admin_form.
|
|
24 | 24 |
*/ |
25 | 25 |
function ldap_authentication_admin_form_validate($form, &$form_state) { |
26 | 26 |
|
... | ... | |
33 | 33 |
|
34 | 34 |
} |
35 | 35 |
|
36 |
|
|
37 | 36 |
/** |
38 |
* submit handler function for ldap_authentication_admin_form
|
|
37 |
* Submit handler function for ldap_authentication_admin_form.
|
|
39 | 38 |
*/ |
40 |
|
|
41 | 39 |
function ldap_authentication_admin_form_submit($form, &$form_state) { |
42 | 40 |
|
43 | 41 |
ldap_servers_module_load_include('php', 'ldap_authentication', 'LdapAuthenticationConfAdmin.class'); |
44 | 42 |
$auth_conf = new LdapAuthenticationConfAdmin(); |
45 |
$auth_conf->drupalFormSubmit($form_state['values']); // add form data to object and save or create |
|
43 |
// Add form data to object and save or create. |
|
44 |
$auth_conf->drupalFormSubmit($form_state['values']); |
|
46 | 45 |
if (!$auth_conf->hasEnabledAuthenticationServers()) { |
47 | 46 |
drupal_set_message(t('No LDAP servers are enabled for authentication, |
48 | 47 |
so no LDAP Authentication can take place. This essentially disables |
Formats disponibles : Unified diff
Weekly update of contrib modules