Projet

Général

Profil

Révision bc175c27

Ajouté par Assos Assos il y a plus de 5 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/ldap/ldap_user/ldap_user.module
152 152
function ldap_user_mail($key, &$message, $params) {
153 153
  switch ($key) {
154 154
    case 'orphaned_accounts':
155
      $message['subject'] =  variable_get('site_name') . ' ' . t('Orphaned LDAP Users');
156
      $message['body'][] =  t('The following !count Drupal users no longer have
155
      $message['subject'] = variable_get('site_name') . ' ' . t('Orphaned LDAP Users');
156
      $message['body'][] = t('The following !count Drupal users no longer have
157 157
        corresponding LDAP Entries.  Perhaps they have been removed from the LDAP
158 158
        and should be removed:', array('!count' => count($params['accounts'])))
159 159
        . "\n\n" . t('username,mail,edit url') . "\n" .
......
239 239
          $attributes[$ldap_server->unique_persistent_attr] = ldap_servers_set_attribute_map(@$attributes[$ldap_server->unique_persistent_attr]);
240 240
        }
241 241
        if ($ldap_server->mail_template) {
242
          ldap_servers_token_extract_attributes($attributes,  $ldap_server->mail_template);
242
          ldap_servers_token_extract_attributes($attributes, $ldap_server->mail_template);
243 243
        }
244 244
      break;
245 245
    }
......
263 263
  $direction = isset($params['direction']) ? $params['direction'] : LDAP_USER_PROV_DIRECTION_NONE;
264 264

  
265 265
  if ($direction == LDAP_USER_PROV_DIRECTION_TO_LDAP_ENTRY) {
266
    $available_user_attrs['[property.name]'] =  array(
266
    $available_user_attrs['[property.name]'] = array(
267 267
      'name' => 'Property: Username',
268 268
      'source' => '',
269 269
      'direction' => LDAP_USER_PROV_DIRECTION_TO_LDAP_ENTRY,
......
274 274
      'configurable_to_ldap' => TRUE,
275 275
      );
276 276

  
277
    $available_user_attrs['[property.mail]'] =  array(
277
    $available_user_attrs['[property.mail]'] = array(
278 278
      'name' => 'Property: Email',
279 279
      'source' => '',
280 280
      'direction' => LDAP_USER_PROV_DIRECTION_TO_LDAP_ENTRY,
......
285 285
      'configurable_to_ldap' => TRUE,
286 286
    );
287 287

  
288
    $available_user_attrs['[property.picture]'] =  array(
288
    $available_user_attrs['[property.picture]'] = array(
289 289
      'name' => 'Property: picture',
290 290
      'source' => '',
291 291
      'direction' => LDAP_USER_PROV_DIRECTION_TO_LDAP_ENTRY,
......
296 296
      'configurable_to_ldap' => TRUE,
297 297
    );
298 298

  
299
    $available_user_attrs['[property.uid]'] =  array(
299
    $available_user_attrs['[property.uid]'] = array(
300 300
      'name' => 'Property: Drupal User Id (uid)',
301 301
      'source' => '',
302 302
      'direction' => LDAP_USER_PROV_DIRECTION_TO_LDAP_ENTRY,
......
372 372
  }
373 373

  
374 374
  if ($direction == LDAP_USER_PROV_DIRECTION_TO_LDAP_ENTRY) {
375
    $available_user_attrs['[password.random]'] =  array(
375
    $available_user_attrs['[password.random]'] = array(
376 376
      'name' => 'Pwd: Random',
377 377
      'source' => '',
378 378
      'direction' => LDAP_USER_PROV_DIRECTION_TO_LDAP_ENTRY,
......
384 384
    );
385 385

  
386 386
    // use user password when available fall back to random pwd
387
    $available_user_attrs['[password.user-random]'] =  array(
387
    $available_user_attrs['[password.user-random]'] = array(
388 388
      'name' => 'Pwd: User or Random',
389 389
      'source' => '',
390 390
      'direction' => LDAP_USER_PROV_DIRECTION_TO_LDAP_ENTRY,
......
567 567

  
568 568
  if ($ldap_user_conf->provisionEnabled(LDAP_USER_PROV_DIRECTION_TO_LDAP_ENTRY, LDAP_USER_DRUPAL_USER_PROV_ON_USER_UPDATE_CREATE)) {
569 569
    $ldap_fieldset['ldap_user_association']['#disabled'] = TRUE;
570
    $ldap_fieldset['ldap_user_association']['#description'] =  t('Since "Create
570
    $ldap_fieldset['ldap_user_association']['#description'] = t('Since "Create
571 571
      or Synch to Drupal user anytime a Drupal user account is created or updated"
572 572
      is selected at admin/config/people/ldap/user, this option will have no
573 573
      effect so its disabled.');
574 574
  }
575 575
  elseif ($ldap_user_conf->manualAccountConflict != LDAP_USER_MANUAL_ACCT_CONFLICT_SHOW_OPTION_ON_FORM) {
576 576
    $ldap_fieldset['ldap_user_association']['#disabled'] = TRUE;
577
    $ldap_fieldset['ldap_user_association']['#description'] =  t('To enable
577
    $ldap_fieldset['ldap_user_association']['#description'] = t('To enable
578 578
      this an LDAP server must be selected for provisioning to Drupal in
579 579
      admin/config/people/ldap/user and "Show option on user create form..." must be selected.');
580 580
  }
......
594 594
  if (count($ldap_fieldset) > 0) {
595 595
    $form['ldap_user_fields'] = $ldap_fieldset;
596 596
    $form['ldap_user_fields']['#type'] = 'fieldset';
597
    $form['ldap_user_fields']['#title'] =  t('LDAP Options');
598
    $form['ldap_user_fields']['#collapsible'] =  TRUE;
599
    $form['ldap_user_fields']['#collapsed'] =  FALSE;
597
    $form['ldap_user_fields']['#title'] = t('LDAP Options');
598
    $form['ldap_user_fields']['#collapsible'] = TRUE;
599
    $form['ldap_user_fields']['#collapsed'] = FALSE;
600 600
  }
601 601

  
602 602
  $form['#validate'][] = 'ldap_user_form_register_form_validate';
......
1038 1038
      if ($ldap_user_conf->provisionEnabled(LDAP_USER_PROV_DIRECTION_TO_DRUPAL_USER, LDAP_USER_DRUPAL_USER_PROV_ON_USER_UPDATE_CREATE)) {
1039 1039
        if (ldap_user_is_ldap_associated($account, LDAP_USER_PROV_DIRECTION_TO_DRUPAL_USER)) {
1040 1040
          $ldap_user = ldap_servers_get_user_ldap_data($drupal_username, $ldap_user_conf->drupalAcctProvisionServer, 'ldap_user_prov_to_drupal');
1041
          $ldap_server = ldap_servers_get_servers($ldap_user_conf->drupalAcctProvisionServer, NULL, TRUE);
1042
          $ldap_user_conf->entryToUserEdit($ldap_user, $user_edit, $ldap_server, LDAP_USER_PROV_DIRECTION_TO_DRUPAL_USER, array(LDAP_USER_EVENT_SYNCH_TO_DRUPAL_USER));
1041
          if ($ldap_user) {
1042
            $ldap_server = ldap_servers_get_servers($ldap_user_conf->drupalAcctProvisionServer, NULL, TRUE);
1043
            $ldap_user_conf->entryToUserEdit($ldap_user, $user_edit, $ldap_server, LDAP_USER_PROV_DIRECTION_TO_DRUPAL_USER, array(LDAP_USER_EVENT_SYNCH_TO_DRUPAL_USER));
1044
          }
1043 1045
        }
1044 1046
      }
1045 1047
    }
......
1095 1097
      $element['value'] = $element + array(
1096 1098
        '#type' => 'value',
1097 1099
        '#value' => isset($items[$delta]['value']) ? $items[$delta]['value'] : NULL,
1100
        '#attached' => array(
1101
          'css' => array(
1102
            drupal_get_path('module', 'ldap_user') . '/ldap_user.css',
1103
          ),
1104
        ),
1098 1105
      );
1099 1106
      break;
1100 1107
  }

Formats disponibles : Unified diff