/** * * Verifies user credentials based on username and password provided, then resestablishes * management user connection to Active Directory. * @param $uname * @param $pword */ public function bind($uname, $pword) { try { if (ldap_bind($this->LDAPConn, Staple_AD::usrlogin($uname), $pword)) { $this->mgmtbind(); return TRUE; } else { $this->mgmtbind(); return FALSE; } } catch (Exception $e) { $this->mgmtbind(); return FALSE; } }