* added an additional check so not everyone "attempts" ldap search if this is not configured (compose.patch did not contain this)
| | |
| | | $a_contacts = array(); |
| | | |
| | | if ($result = $CONTACTS->list_records()) |
| | | { |
| | | { |
| | | while ($sql_arr = $result->iterate()) |
| | | if ($sql_arr['email']) |
| | | $a_contacts[] = format_email_recipient($sql_arr['email'], JQ($sql_arr['name'])); |
| | | } |
| | | |
| | | } |
| | | if (isset($CONFIG['ldap_public'])) { |
| | | { |
| | | /* LDAP autocompletion */ |
| | | foreach ($CONFIG['ldap_public'] as $ldapserv_config) |
| | | { |
| | |
| | | } |
| | | |
| | | $LDAP->close(); |
| | | } |
| | | |
| | | if ($a_contacts) |
| | | { |
| | | } |
| | | } |
| | | if ($a_contacts) |
| | | { |
| | | $OUTPUT->set_env('contacts', $a_contacts); |
| | | } |
| | | |
| | | } |
| | | parse_template('compose'); |
| | | ?> |