Changeset 6660
- Timestamp:
- 12/21/07 08:03:20 (2 years ago)
- Files:
-
- branches/1.1/lib/config/sfFactoryConfigHandler.class.php (modified) (1 diff)
- branches/1.1/lib/user/sfBasicSecurityUser.class.php (modified) (4 diffs)
- branches/1.1/lib/user/sfUser.class.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1.1/lib/config/sfFactoryConfigHandler.class.php
r6551 r6660 124 124 125 125 case 'user': 126 $instances[] = sprintf(" \$class = sfConfig::get('sf_factory_user', '%s');\n \$this->factories['user'] = new \$class(\$this->dispatcher, \$this->factories['storage'], array_merge(array('auto_shutdown' => false, 'culture' => \$this->factories['request']->getParameter('sf_culture'), 'default_culture' => sfConfig::get('sf_i18n_default_culture'), 'use_flash' => sfConfig::get('sf_use_flash') ), sfConfig::get('sf_factory_user_parameters', %s)));", $class, var_export(is_array($parameters) ? $parameters : array(), true));126 $instances[] = sprintf(" \$class = sfConfig::get('sf_factory_user', '%s');\n \$this->factories['user'] = new \$class(\$this->dispatcher, \$this->factories['storage'], array_merge(array('auto_shutdown' => false, 'culture' => \$this->factories['request']->getParameter('sf_culture'), 'default_culture' => sfConfig::get('sf_i18n_default_culture'), 'use_flash' => sfConfig::get('sf_use_flash'), 'logging' => sfConfig::get('sf_logging_enabled')), sfConfig::get('sf_factory_user_parameters', %s)));", $class, var_export(is_array($parameters) ? $parameters : array(), true)); 127 127 break; 128 128 branches/1.1/lib/user/sfBasicSecurityUser.class.php
r6658 r6660 63 63 if ($credential == $value) 64 64 { 65 if ( sfConfig::get('sf_logging_enabled'))65 if ($this->getParameter('logging')) 66 66 { 67 67 $this->dispatcher->notify(new sfEvent($this, 'application.log', array(sprintf('Remove credential "%s"', $credential)))); … … 97 97 $credentials = (is_array(func_get_arg(0))) ? func_get_arg(0) : func_get_args(); 98 98 99 if ( sfConfig::get('sf_logging_enabled'))99 if ($this->getParameter('logging')) 100 100 { 101 101 $this->dispatcher->notify(new sfEvent($this, 'application.log', array(sprintf('Add credential(s) "%s"', implode(', ', $credentials))))); … … 172 172 public function setAuthenticated($authenticated) 173 173 { 174 if ( sfConfig::get('sf_logging_enabled'))174 if ($this->getParameter('logging')) 175 175 { 176 176 $this->dispatcher->notify(new sfEvent($this, 'application.log', array(sprintf('User is %sauthenticated', $authenticated === true ? '' : 'not ')))); … … 240 240 if (false !== $timeout && !is_null($this->lastRequest) && time() - $this->lastRequest >= $timeout) 241 241 { 242 if ( sfConfig::get('sf_logging_enabled'))242 if ($this->getParameter('logging')) 243 243 { 244 244 $this->dispatcher->notify(new sfEvent($this, 'application.log', array('Automatic user logout due to timeout'))); branches/1.1/lib/user/sfUser.class.php
r6606 r6660 95 95 if ($this->getParameter('use_flash', false) && $names = $this->attributeHolder->getNames('symfony/user/sfUser/flash')) 96 96 { 97 if ( sfConfig::get('sf_logging_enabled'))97 if ($this->getParameter('logging')) 98 98 { 99 99 $this->dispatcher->notify(new sfEvent($this, 'application.log', array(sprintf('Flag old flash messages ("%s")', implode('", "', $names))))); … … 243 243 if ($this->getParameter('use_flash', false) && $names = $this->attributeHolder->getNames('symfony/user/sfUser/flash/remove')) 244 244 { 245 if ( sfConfig::get('sf_logging_enabled'))245 if ($this->getParameter('logging')) 246 246 { 247 247 $this->dispatcher->notify(new sfEvent($this, 'application.log', array(sprintf('Remove old flash messages ("%s")', implode('", "', $names)))));

