What would be the most appropriate structure of the module in order to rewrite function validate() at


The idea is to rewrite that block with the following content :

if ($this->useValidateSessionExpire() ) {
    // If the VALIDATOR_SESSION_EXPIRE_TIMESTAMP key is not set, do it now
    if( !isset($sessionData[self::VALIDATOR_SESSION_EXPIRE_TIMESTAMP]) ) {
        // $this->_data is a reference to the $_SESSION variable so it will be automatically modified
        $this->_data[self::VALIDATOR_SESSION_EXPIRE_TIMESTAMP] = time() + $this->getCookie()->getLifetime();
        return true;
    } elseif ( $sessionData[self::VALIDATOR_SESSION_EXPIRE_TIMESTAMP] < time() ) {
        return false;
} else {
        = $validatorData[self::VALIDATOR_SESSION_EXPIRE_TIMESTAMP];

1 Answer 1


You can't rewrite this file in a module, you'll have to place the file in a new location as described by Rakesh.

This isn't really a file you should be trying to change, if you're having issues with session validation you're probably better off patching or upgrading your magento instance, I've had issues with validation in the past and they have all since been resolved by upgrading

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.