<?php

class rememberFilter extends sfFilter {
    public function execute($filterChain)
    {
        // Execute this filter only once
        if ($this->isFirstCall()) {
            $this->getContext()->getUser()->setCulture(sfConfig::get('app_translations_default_language'));
            // Check for auto-login
            $className = sfConfig::get('app_login_handler', 'catalyz_LoginHandler');
			if(!class_exists($className)){
				throw new Exception(sprintf('Unkown login handler: %s', $className));
			}
            $loginHandler = new $className();
            $loginHandler->AutoLogin();
        }
        // Execute next filter
        $filterChain->execute();
    }
}

?>