"Email", "onkeyup" => "check_if_we_should_enable_sending_email();"); $attribute_map = $LDAP['default_attribute_map']; if (isset($LDAP['account_additional_attributes'])) { $attribute_map = ldap_complete_attribute_array($attribute_map,$LDAP['account_additional_attributes']); } if (! array_key_exists($LDAP['account_attribute'], $attribute_map)) { $attribute_r = array_merge($attribute_map, array($LDAP['account_attribute'] => array("label" => "Account UID"))); } if (!isset($_POST['account_identifier']) and !isset($_GET['account_identifier'])) { ?>

The account identifier is missing.

0) { foreach ($attribute_map as $attribute => $attr_r) { if (isset($user[0][$attribute]) and $user[0][$attribute]['count'] > 0) { $$attribute = $user[0][$attribute]; } else { $$attribute = array(); } if (isset($_FILES[$attribute]['size']) and $_FILES[$attribute]['size'] > 0) { $this_attribute = array(); $this_attribute['count'] = 1; $this_attribute[0] = file_get_contents($_FILES[$attribute]['tmp_name']); $$attribute = $this_attribute; $to_update[$attribute] = $this_attribute; unset($to_update[$attribute]['count']); } if (isset($_POST['update_account']) and isset($_POST[$attribute])) { $this_attribute = array(); if (is_array($_POST[$attribute])) { foreach($_POST[$attribute] as $key => $value) { if ($value != "") { $this_attribute[$key] = filter_var($value, FILTER_SANITIZE_FULL_SPECIAL_CHARS); } } $this_attribute['count'] = count($this_attribute); } elseif ($_POST[$attribute] != "") { $this_attribute['count'] = 1; $this_attribute[0] = filter_var($_POST[$attribute], FILTER_SANITIZE_FULL_SPECIAL_CHARS); } if ($this_attribute != $$attribute) { $$attribute = $this_attribute; $to_update[$attribute] = $this_attribute; unset($to_update[$attribute]['count']); } } if (!isset($$attribute) and isset($attr_r['default'])) { $$attribute['count'] = 1; $$attribute[0] = $attr_r['default']; } } $dn = $user[0]['dn']; } else { ?>

This account doesn't exist.

The password wasn't strong enough.

The password contained invalid characters.

The passwords didn't match.

$group) { if (is_numeric($index)) { array_push($updated_group_membership,$group); } } if ($USER_ID == $account_identifier and !array_search($USER_ID, $updated_group_membership)){ array_push($updated_group_membership,$LDAP["admins_group"]); } $groups_to_add = array_diff($updated_group_membership,$currently_member_of); $groups_to_del = array_diff($currently_member_of,$updated_group_membership); foreach ($groups_to_del as $this_group) { ldap_delete_member_from_group($ldap_connection,$this_group,$account_identifier); } foreach ($groups_to_add as $this_group) { ldap_add_member_to_group($ldap_connection,$this_group,$account_identifier); } $not_member_of = array_diff($all_groups,$updated_group_membership); $member_of = $updated_group_membership; render_alert_banner("The group membership has been updated."); } else { $member_of = $currently_member_of; } ################ ?>

/index.php" method="post">
  • $attr_r) { $label = $attr_r['label']; if (isset($attr_r['onkeyup'])) { $onkeyup = $attr_r['onkeyup']; } else { $onkeyup = ""; } if (isset($attr_r['inputtype'])) { $inputtype = $attr_r['inputtype']; } else { $inputtype = ""; } if ($attribute == $LDAP['account_attribute']) { $label = "$label*"; } if (isset($$attribute)) { $these_values=$$attribute; } else { $these_values = array(); } render_attribute_fields($attribute,$label,$these_values,$dn,$onkeyup,$inputtype); } ?>
    Email the updated credentials to the user?

    *The account identifier. Changing this will change the full DN.

Group membership

Member of
    {$group}
\n"; } else { print "
  • $group
  • \n"; } } ?>
    Available groups
      $group\n"; } ?>