Skip to content
Snippets Groups Projects
Commit 9d47e1bd authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

update ldap class

parent 9954be1f
No related branches found
No related tags found
1 merge request!62V2.0
...@@ -3,12 +3,12 @@ ...@@ -3,12 +3,12 @@
/** /**
* *
* IML LDAP CONNECTOR * IML LDAP CONNECTOR
* *<pre>
* 2022-02-22 ah added objGet(), sanitizeFilter() * 2022-02-22 ah added objGet(), sanitizeFilter() <br>
* 2022-08-18 ah mask password (showing 4 chars only) * 2022-08-18 ah mask password (showing 4 chars only) <br>
* 2022-08-22 ah mhash is deprecated * 2022-08-22 ah mhash is deprecated <br>
* 2022-08-26 ah fix verifyPassword * 2022-08-26 ah fix verifyPassword <br>
* * </pre>
* @author axel.hahn@iml.unibe.ch * @author axel.hahn@iml.unibe.ch
*/ */
class imlldap { class imlldap {
...@@ -34,6 +34,7 @@ class imlldap { ...@@ -34,6 +34,7 @@ class imlldap {
* @var object current ldap connection * @var object current ldap connection
*/ */
private $_ldapConn = false; private $_ldapConn = false;
/** /**
* @var bool bind was done? * @var bool bind was done?
*/ */
...@@ -288,7 +289,7 @@ class imlldap { ...@@ -288,7 +289,7 @@ class imlldap {
* *
* @param array $aRecord singel result item * @param array $aRecord singel result item
* @return array * @return array
*/
public function normalizeSearchresult($aLdapSearchresult) { public function normalizeSearchresult($aLdapSearchresult) {
if (!is_array($aLdapSearchresult)){ if (!is_array($aLdapSearchresult)){
return false; return false;
...@@ -300,7 +301,6 @@ class imlldap { ...@@ -300,7 +301,6 @@ class imlldap {
} }
return $aReturn; return $aReturn;
} }
*/
/** /**
* sanitize value to put into a search filter * sanitize value to put into a search filter
...@@ -396,8 +396,8 @@ class imlldap { ...@@ -396,8 +396,8 @@ class imlldap {
* It returns false if the user does not exist or is * It returns false if the user does not exist or is
* not member of the group 'DnAppNode' (if it was set). * not member of the group 'DnAppNode' (if it was set).
* *
* @param type $sUser user id (uid) or email (mail) to search * @param string $sUser user id (uid) or email (mail) to search
* @param type $aAttributesToGet i.e. array("ou", "sn", "vorname", "mail", "uid", "memberOf") * @param array $aAttributesToGet i.e. array("ou", "sn", "vorname", "mail", "uid", "memberOf")
* @return boolean|array * @return boolean|array
*/ */
public function getUserInfo($sUser, $aAttributesToGet = array("*")) { public function getUserInfo($sUser, $aAttributesToGet = array("*")) {
...@@ -521,7 +521,7 @@ class imlldap { ...@@ -521,7 +521,7 @@ class imlldap {
* this requires a ldap bind with master/ admin account * this requires a ldap bind with master/ admin account
* *
* @param string $sDn dn to update * @param string $sDn dn to update
* @param string $aItem array of new ldap properties * @param array $aItem array of new ldap properties
* @return boolean * @return boolean
*/ */
public function objAdd($sDn, $aItem) { public function objAdd($sDn, $aItem) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment