| @@ 117-126 (lines=10) @@ | ||
| 114 | * | |
| 115 |      * @SuppressWarnings("StaticAccess") | |
| 116 | */ | |
| 117 | protected function enableRead() | |
| 118 |     { | |
| 119 | //Make sure we are bound in read mode | |
| 120 | $auth = \AuthProvider::getInstance(); | |
| 121 |         $ldap = $auth->getMethodByName('Auth\LDAPAuthenticator'); | |
| 122 | if($ldap !== false) | |
| 123 |         { | |
| 124 | $this->server = $ldap->getAndBindServer(false); | |
| 125 | } | |
| 126 | } | |
| 127 | ||
| 128 | /** | |
| 129 | * Allow write for the user | |
| @@ 133-142 (lines=10) @@ | ||
| 130 | * | |
| 131 |      * @SuppressWarnings("StaticAccess") | |
| 132 | */ | |
| 133 | protected function enableReadWrite() | |
| 134 |     { | |
| 135 | //Make sure we are bound in write mode | |
| 136 | $auth = \AuthProvider::getInstance(); | |
| 137 |         $ldap = $auth->getMethodByName('Auth\LDAPAuthenticator'); | |
| 138 | if($ldap !== false) | |
| 139 |         { | |
| 140 | $this->server = $ldap->getAndBindServer(true); | |
| 141 | } | |
| 142 | } | |
| 143 | ||
| 144 | public function getGroups() | |
| 145 |     { | |