Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LDAP error Class 'humhub\modules\user\libs\LdapException' not found when using wrong password #1668

Closed
pirobase-pfuchs opened this issue Apr 26, 2016 · 0 comments
Labels

Comments

@pirobase-pfuchs
Copy link

When trying to log on to HumHub 1.0 using LDAP authentication and wrong credentials a PHP error screen is displayed saying that class 'humhub\modules\user\libs\LdapException' could not be found:

PHP Fatal Error – yii\base\ErrorException

Class 'humhub\modules\user\libs\LdapException' not found

  1. in /var/www/humhub-1.0.0/protected/humhub/modules/user/libs/Ldap.php at line 113
        // disconnect id needed here because otherwise binding/ldap connection again can cause errors.
        $this->ldap->disconnect();

        // Update Users Data
        $node = $this->ldap->getNode($username);
        $this->handleLdapUser($node);
        return true;
    } catch (\Zend\Ldap\Exception\LdapException $ex) {
        // log errors other than invalid credentials
        if ($ex->getCode() !== LdapException::LDAP_INVALID_CREDENTIALS) {
            Yii::error('LDAP Error: ' . $ex->getMessage());
        }
        return false;
    } catch (Exception $ex) {
        Yii::error('LDAP Error: ' . $ex->getMessage());
        return false;
    }
}

Instead a rendered error message should be displayed.

@luke- luke- closed this as completed in 5b4373a May 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants