private function update(PFUser $user) { if ($this->userIsFirstAdmin($user)) { return; } $dn = $this->getUserDN($user); if ($this->entryExists($user)) { if ($user->isAlive()) { $this->ldap->update($dn, $this->getLDAPInfo($user)); } elseif ($user->isSuspended()) { $info = $this->getLDAPInfo($user); $info['userPassword'] = '******' . $this->getLDAPPassword($user); $this->ldap->update($dn, $info); } else { $this->ldap->delete($dn); } } else { $this->create($user); } }