function validatePassword( $password )
    {
        eZDebug::writeDebug( 'Validate Password Start','eZPaEx::validatePassword' );
        if ( $this->hasRegexp() && ( $password != '_ezpassword' ) )
        {
            $regexp = preg_replace( array('/(^\/)/', '/(\/$)/'), '', $this->attribute( 'passwordvalidationregexp' ) );
            if ( !preg_match( '/' . $regexp . '/', $password ) )
            {
                eZDebug::writeDebug( 'Password KO', 'eZPaEx::validatePassword' );
                return false;
            }
        }
        eZDebug::writeDebug( 'Password OK', 'eZPaEx::validatePassword' );

        return true;
    }
function validatePassword( $password )
    {
        eZDebug::writeDebug( 'Validate Password Start','eZPaEx::validatePassword' );
        if ( $this->hasRegexp() && ( $password != '_ezpassword' ) )
        {
            $regexp = preg_replace( array('/(^\/)/', '/(\/$)/'), '', $this->attribute( 'passwordvalidationregexp' ) );
            if ( !preg_match( '/' . $regexp . '/', $password ) )
            {
                eZDebug::writeDebug( 'Password KO', 'eZPaEx::validatePassword' );
                return false;
            }
        }
        eZDebug::writeDebug( 'Password OK', 'eZPaEx::validatePassword' );

        return true;
    }
function validatePassword ( $ password ) { eZDebug :: writeDebug ( 'Validate Password Start' , 'eZPaEx::validatePassword' ) ; if ( $ this -> hasRegexp ( ) && ( $ password != '_ezpassword' ) ) { $ regexp = preg_replace ( array ( '/(^\/)/' , '/(\/$)/' ) , '' , $ this -> attribute ( 'passwordvalidationregexp' ) ) ; if ( ! preg_match ( '/' . $ regexp . '/' , $ password ) ) { eZDebug :: writeDebug ( 'Password KO' , 'eZPaEx::validatePassword' ) ; return false ; } } eZDebug :: writeDebug ( 'Password OK' , 'eZPaEx::validatePassword' ) ; return true ; }
Check if password matches regexp validation

@param string $password Actual password to check
@return bool
Check if password matches regexp validation