application/Espo/Core/Utils/Authentication/LDAP.php
protected function adminLogin($username, $password)
    {
        $hash = $this->getPasswordHash()->hash($password);

        $user = $this->getEntityManager()->getRepository('User')->findOne([
            'whereClause' => [
                'userName' => $username,
                'password' => $hash,
                'type' => ['admin', 'super-admin']
            ]
        ]);

        return $user;
    }
protected function adminLogin($username, $password)
    {
        $hash = $this->getPasswordHash()->hash($password);

        $user = $this->getEntityManager()->getRepository('User')->findOne([
            'whereClause' => [
                'userName' => $username,
                'password' => $hash,
                'type' => ['admin', 'super-admin']
            ]
        ]);

        return $user;
    }
protected function adminLogin ( $ username , $ password ) { $ hash = $ this -> getPasswordHash ( ) -> hash ( $ password ) ; $ user = $ this -> getEntityManager ( ) -> getRepository ( 'User' ) -> findOne ( [ 'whereClause' => [ 'userName' => $ username , 'password' => $ hash , 'type' => [ 'admin' , 'super-admin' ] ] ] ) ; return $ user ; }
Login user with administrator rights

@param  string $username
@param  string $password
@return \Espo\Entities\User | null
Login user with administrator rights