Index: trunk/core/units/users/users_event_handler.php =================================================================== diff -u -N -r1868 -r1929 --- trunk/core/units/users/users_event_handler.php (.../users_event_handler.php) (revision 1868) +++ trunk/core/units/users/users_event_handler.php (.../users_event_handler.php) (revision 1929) @@ -160,7 +160,17 @@ $this->setNextTemplate($event); - if( !$this->Application->IsAdmin() && ($event->status == erSUCCESS) && $event->redirect) $this->autoLoginUser($event); + if( !$this->Application->IsAdmin() && ($event->status == erSUCCESS) && $event->redirect) + { + $this->autoLoginUser($event); + + $object =& $event->getObject(); + if( $object->GetDBField('Status') != STATUS_ACTIVE ) + { + $next_template = $this->Application->GetVar('next_template'); + if($next_template) $event->redirect = $next_template; + } + } } /** @@ -180,11 +190,13 @@ { case 1: // Instant $object->SetDBField('Status', 1); - $event->redirect = $this->Application->GetVar('registration_confirm_template'); + $next_template = $this->Application->GetVar('registration_confirm_template'); + if($next_template) $event->redirect = $next_template; break; case 3: // Pending - $event->redirect = $this->Application->GetVar('registration_confirm_pending_template'); + $next_template = $this->Application->GetVar('registration_confirm_pending_template'); + if($next_template) $event->redirect = $next_template; $object->SetDBField('Status', 2); break;