public function revalidatePassword(CNabuSite $nb_site, CNabuUser $nb_user, string $passwd) : bool
    {
        if (!($nb_site instanceof CNabuSite)) {
            throw new ENabuCoreException(ENabuCoreException::ERROR_METHOD_PARAMETER_NOT_VALID, array('$nb_site'));
        }

        if (!($nb_user instanceof CNabuUser) || !$nb_user->isFetched()) {
            throw new ENabuCoreException(ENabuCoreException::ERROR_METHOD_PARAMETER_NOT_VALID, array('$nb_user'));
        }

        if (!is_string($passwd)) {
            throw new ENabuCoreException(
                ENabuCoreException::ERROR_UNEXPECTED_PARAM_VALUE,
                array('$passwd', print_r($passwd, true))
            );
        }

        $nb_log_user = CNabuUser::findBySiteLogin($nb_site, $nb_user->getLogin(), $passwd);

        return $nb_user->getId() == $nb_log_user->getId();
    }
public function revalidatePassword(CNabuSite $nb_site, CNabuUser $nb_user, string $passwd) : bool
    {
        if (!($nb_site instanceof CNabuSite)) {
            throw new ENabuCoreException(ENabuCoreException::ERROR_METHOD_PARAMETER_NOT_VALID, array('$nb_site'));
        }

        if (!($nb_user instanceof CNabuUser) || !$nb_user->isFetched()) {
            throw new ENabuCoreException(ENabuCoreException::ERROR_METHOD_PARAMETER_NOT_VALID, array('$nb_user'));
        }

        if (!is_string($passwd)) {
            throw new ENabuCoreException(
                ENabuCoreException::ERROR_UNEXPECTED_PARAM_VALUE,
                array('$passwd', print_r($passwd, true))
            );
        }

        $nb_log_user = CNabuUser::findBySiteLogin($nb_site, $nb_user->getLogin(), $passwd);

        return $nb_user->getId() == $nb_log_user->getId();
    }
public function revalidatePassword ( CNabuSite $ nb_site , CNabuUser $ nb_user , string $ passwd ) : bool { if ( ! ( $ nb_site instanceof CNabuSite ) ) { throw new ENabuCoreException ( ENabuCoreException :: ERROR_METHOD_PARAMETER_NOT_VALID , array ( '$nb_site' ) ) ; } if ( ! ( $ nb_user instanceof CNabuUser ) || ! $ nb_user -> isFetched ( ) ) { throw new ENabuCoreException ( ENabuCoreException :: ERROR_METHOD_PARAMETER_NOT_VALID , array ( '$nb_user' ) ) ; } if ( ! is_string ( $ passwd ) ) { throw new ENabuCoreException ( ENabuCoreException :: ERROR_UNEXPECTED_PARAM_VALUE , array ( '$passwd' , print_r ( $ passwd , true ) ) ) ; } $ nb_log_user = CNabuUser :: findBySiteLogin ( $ nb_site , $ nb_user -> getLogin ( ) , $ passwd ) ; return $ nb_user -> getId ( ) == $ nb_log_user -> getId ( ) ; }
Revalidates a password to ensure that the user can continue in the private zone.
@param CNabuSite $nb_site Site to revalidate navigation.
@param CNabuUser $nb_user User to be revalidated.
@param string $passwd Password without encoding.
@return bool Returns true if revalidation success or false if not.
Revalidates a password to ensure that the user can continue in the private zone .