Skip to content

Commit

Permalink
Merge pull request #869 from Shadow243/ldap-contact-error-with-php82
Browse files Browse the repository at this point in the history
Fix ldap_contacts error running under php8.2 & remove unused and correct ldap .env variable
  • Loading branch information
kroky authored Jan 31, 2024
2 parents 33f59af + 8a8a3e5 commit 4c1f6a6
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 60 deletions.
15 changes: 9 additions & 6 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ DB_SOCKET=/var/lib/mysqld/mysqld.sock

SESSION_TYPE=PHP
AUTH_TYPE=DB
LDAP_AUTH_SERVER=localhost
LDAP_AUTH_PORT=389
LDAP_AUTH_TLS=
LDAP_AUTH_BASE_DN=example,dc=com

IMAP_AUTH_NAME=localhost
IMAP_AUTH_SERVER=localhost
Expand Down Expand Up @@ -169,17 +165,24 @@ OUTLOOK_AUTH_URI=https://login.live.com/oauth20_authorize.srf
OUTLOOK_TOKEN_URI=https://login.live.com/oauth20_token.srf
OUTLOOK_REFRESH_URI=https://login.live.com/oauth20_token.srf

#ldap
#ldap.php
LDAP_SERVER=localhost
LDAP_ENABLE_TLS=true
LDAP_PORT=389
LDAP_BASE_DN="dc=example,dc=com"
LDAP_SEARCH_TERM="objectclass=inetOrgPerson"
LDAP_SEARCH_TERM=false
LDAP_AUTH=false
LDAP_USER=''
LDAP_PASS=''
LDAP_OBJECT_CLASS="top,person,organizationalperson,inetorgperson"
LDAP_READ_WRITE=true

#app.php
LDAP_AUTH_PORT=389
LDAP_AUTH_SERVER=localhost
LDAP_AUTH_TLS=
LDAP_AUTH_BASE_DN="example,dc=com"

#WordPress
WORDPRESS_CLIENT_ID=
WORDPRESS_CLIENT_SECRET=
Expand Down
6 changes: 4 additions & 2 deletions config/carddav.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

return [
/*
| [Personal]
|
| ----------------------------------------
| Constants used for CardDav communication
| ----------------------------------------
Expand All @@ -18,5 +18,7 @@
|
|
*/
'server' => env('CARD_DAV_SERVER', 'http://localhost:5232'),
'Personal' => [
'server' => env('CARD_DAV_SERVER', 'http://localhost:5232'),
]
];
101 changes: 49 additions & 52 deletions config/ldap.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,60 +14,57 @@
|
| Create one section for each LDAP backend you want to support. The section name
| will be used in the UI for the name of this addressbook
| [Personal]
|
*/
'ldap' => [
/*
| LDAP Server hostname or IP address
*/
'server' => env('LDAP_SERVER', 'localhost'),

/*
| Flag to enable or disable TLS connections
*/
'enable_tls' => env('LDAP_ENABLE_TLS', true),

/*
| Port to connect to
*/
'port' => env('LDAP_PORT', 389),

/*
| Base DN
*/
'base_dn' => env('LDAP_BASE_DN', 'dc=example,dc=com'),

/*
| Base DN
*/
'search_term' => env('LDAP_SEARCH_TERM', 'objectclass=inetOrgPerson'),

/*
| Flag to enable user binding. Anonymous binding is used when set to false
*/
'auth' => env('LDAP_SEARCH_TERM', false),

/*
| Global username and password to bind with if auth is set to true. If left
| blank, users will have a setting on the Settings -> Site page for this
| connection to enter their own
*/
'user' => env('LDAP_USER', ''),
'pass' => env('LDAP_PASS', ''),

/*
| Object classes for the addressbook entries
*/
'objectclass' => [
'top',
'person',
'organizationalperson',
'inetorgperson'
'Personal' => [
/*
| LDAP Server hostname or IP address
*/
'server' => env('LDAP_SERVER', 'localhost'),

/*
| Flag to enable or disable TLS connections
*/
'enable_tls' => env('LDAP_ENABLE_TLS', true),

/*
| Port to connect to
*/
'port' => env('LDAP_PORT', 389),

/*
| Base DN
*/
'base_dn' => env('LDAP_BASE_DN', 'dc=example,dc=com'),

/*
| Base DN
*/
'search_term' => env('LDAP_SEARCH_TERM', 'objectclass=inetOrgPerson'),

/*
| Flag to enable user binding. Anonymous binding is used when set to false
*/
'auth' => env('LDAP_AUTH', false),

/*
| Global username and password to bind with if auth is set to true. If left
| blank, users will have a setting on the Settings -> Site page for this
| connection to enter their own
*/
'user' => env('LDAP_USER', ''),
'pass' => env('LDAP_PASS', ''),

/*
| Object classes for the addressbook entries
*/
'objectclass' => explode(',', env('LDAP_OBJECT_CLASS','top,person,organizationalperson,inetorgperson')),

/*
| Flag to allow editing of the addressbook contents
*/
'read_write' => env('LDAP_READ_WRITE', true),
],

/*
| Flag to allow editing of the addressbook contents
*/
'read_write' => env('LDAP_READ_WRITE', true),
],
];

0 comments on commit 4c1f6a6

Please sign in to comment.