diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..40b32c7
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+.idea
+ldap-user-manager.iml
diff --git a/README.md b/README.md
index b780c29..3a08f99 100644
--- a/README.md
+++ b/README.md
@@ -181,6 +181,24 @@ To send emails you'll need to use an existing SMTP server. Email sending will b
* `SESSION_TIMEOUT` (default: *10 minutes*): How long before an idle session will be timed out.
+#### Website customization
+
+* `$CUSTOM_LOGO` (default: *FALSE*)*: If this is defined with path to image file, then this image will be displayed in header. You need also mount volume with this file.
+
+* `$CUSTOM_STYLES` (default: *FALSE*)*: If this is defined with path to css file, then this style will be used in header. Also helps vith logo positioninig. You need also mount volume with this file.
+
+docker-compose.yml example:
+
+```yaml
+ldap-user-manager:
+ environment:
+ CUSTOM_LOGO: "../gfx/logo.svg"
+ CUSTOM_STYLES: "../css/custom.css"
+ volumes:
+ - '/opt/openldap/www/gfx:/opt/ldap_user_manager/gfx'
+ - '/opt/openldap/www/css:/opt/ldap_user_manager/css'
+```
+
#### Debugging settings
* `LDAP_DEBUG` (default: *FALSE*): Set to TRUE to increase the logging level for LDAP requests. This will output passwords to the error log - don't enable this in a production environment. This is for information on problems updating LDAP records and such. To debug problems connecting to the LDAP server in the first place use `LDAP_VERBOSE_CONNECTION_LOGS`.
diff --git a/www/includes/config.inc.php b/www/includes/config.inc.php
index 749ebd6..8d1097e 100644
--- a/www/includes/config.inc.php
+++ b/www/includes/config.inc.php
@@ -109,6 +109,9 @@
###
+ $CUSTOM_LOGO = (getenv('CUSTOM_LOGO') ? getenv('CUSTOM_LOGO') : FALSE);
+ $CUSTOM_STYLES = (getenv('CUSTOM_STYLES') ? getenv('CUSTOM_STYLES') : FALSE);
+
$errors = "";
if (empty($LDAP['uri'])) {
diff --git a/www/includes/web_functions.inc.php b/www/includes/web_functions.inc.php
index 1548d4f..74f0ec1 100644
--- a/www/includes/web_functions.inc.php
+++ b/www/includes/web_functions.inc.php
@@ -229,7 +229,7 @@ function log_out($method='normal') {
function render_header($title="",$menu=TRUE) {
- global $SITE_NAME, $IS_ADMIN, $SENT_HEADERS, $SERVER_PATH;
+ global $SITE_NAME, $IS_ADMIN, $SENT_HEADERS, $SERVER_PATH, $CUSTOM_STYLES;
if (empty($title)) { $title = $SITE_NAME; }
@@ -242,6 +242,7 @@ function render_header($title="",$menu=TRUE) {
+ ' ?>
@@ -277,14 +278,15 @@ function render_menu() {
#Render the navigation menu.
#The menu is dynamically rendered the $MODULES hash
- global $SITE_NAME, $MODULES, $THIS_MODULE, $VALIDATED, $IS_ADMIN, $USER_ID, $SERVER_PATH;
+ global $SITE_NAME, $MODULES, $THIS_MODULE, $VALIDATED, $IS_ADMIN, $USER_ID, $SERVER_PATH, $CUSTOM_LOGO;
?>