| @@ 121-128 (lines=8) @@ | ||
| 118 | * @return boolean either the user can or cannot |
|
| 119 | * @throws \Exception |
|
| 120 | */ |
|
| 121 | public function canChangeAvatar($uid) { |
|
| 122 | $plugin = $this->which[Backend::PROVIDE_AVATAR]; |
|
| 123 | ||
| 124 | if ($plugin) { |
|
| 125 | return $plugin->canChangeAvatar($uid); |
|
| 126 | } |
|
| 127 | throw new \Exception('No plugin implements canChangeAvatar in this LDAP Backend.'); |
|
| 128 | } |
|
| 129 | ||
| 130 | /** |
|
| 131 | * Get the user's home directory |
|
| @@ 136-143 (lines=8) @@ | ||
| 133 | * @return boolean |
|
| 134 | * @throws \Exception |
|
| 135 | */ |
|
| 136 | public function getHome($uid) { |
|
| 137 | $plugin = $this->which[Backend::GET_HOME]; |
|
| 138 | ||
| 139 | if ($plugin) { |
|
| 140 | return $plugin->getHome($uid); |
|
| 141 | } |
|
| 142 | throw new \Exception('No plugin implements getHome in this LDAP Backend.'); |
|
| 143 | } |
|
| 144 | ||
| 145 | /** |
|
| 146 | * Get display name of the user |
|
| @@ 151-158 (lines=8) @@ | ||
| 148 | * @return string display name |
|
| 149 | * @throws \Exception |
|
| 150 | */ |
|
| 151 | public function getDisplayName($uid) { |
|
| 152 | $plugin = $this->which[Backend::GET_DISPLAYNAME]; |
|
| 153 | ||
| 154 | if ($plugin) { |
|
| 155 | return $plugin->getDisplayName($uid); |
|
| 156 | } |
|
| 157 | throw new \Exception('No plugin implements getDisplayName in this LDAP Backend.'); |
|
| 158 | } |
|
| 159 | ||
| 160 | /** |
|
| 161 | * Set display name of the user |
|
| @@ 181-188 (lines=8) @@ | ||
| 178 | * @return int|bool |
|
| 179 | * @throws \Exception |
|
| 180 | */ |
|
| 181 | public function countUsers() { |
|
| 182 | $plugin = $this->which[Backend::COUNT_USERS]; |
|
| 183 | ||
| 184 | if ($plugin) { |
|
| 185 | return $plugin->countUsers(); |
|
| 186 | } |
|
| 187 | throw new \Exception('No plugin implements countUsers in this LDAP Backend.'); |
|
| 188 | } |
|
| 189 | ||
| 190 | /** |
|
| 191 | * @return bool |
|