summaryrefslogtreecommitdiffstats
path: root/lib/Auth/LDAP.php
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-09-24 13:22:31 +0200
committerAleksander Machniak <alec@alec.pl>2013-09-24 13:22:31 +0200
commit48e4427ff85ac7606c3045b1b906dc87c6c8cf20 (patch)
treec77e0914451195b01c090f973a575b22e7b6bd07 /lib/Auth/LDAP.php
parent55b0e6f4f7b5cb743d73d5e389d05ae0bda2428a (diff)
downloadwebadmin-48e4427ff85ac7606c3045b1b906dc87c6c8cf20.tar.gz
Prevent from deleting oneself (Bug #1808)
Diffstat (limited to 'lib/Auth/LDAP.php')
-rw-r--r--lib/Auth/LDAP.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Auth/LDAP.php b/lib/Auth/LDAP.php
index 0ef1f26..1a0fdac 100644
--- a/lib/Auth/LDAP.php
+++ b/lib/Auth/LDAP.php
@@ -1111,7 +1111,8 @@ class LDAP extends Net_LDAP3 {
$entry_dn = $this->entry_dn($entry, $attributes, $base_dn);
- if (!$entry_dn) {
+ // object not found or self deletion
+ if (!$entry_dn || $entry_dn == $_SESSION['user']->user_bind_dn) {
return false;
}