Index: trunk/kernel/units/users/users_event_handler.php =================================================================== diff -u -N -r1868 -r1929 --- trunk/kernel/units/users/users_event_handler.php (.../users_event_handler.php) (revision 1868) +++ trunk/kernel/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; 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; Index: trunk/kernel/units/users/users_tag_processor.php =================================================================== diff -u -N -r1566 -r1929 --- trunk/kernel/units/users/users_tag_processor.php (.../users_tag_processor.php) (revision 1566) +++ trunk/kernel/units/users/users_tag_processor.php (.../users_tag_processor.php) (revision 1929) @@ -19,6 +19,11 @@ return $this->Application->ConfigValue('User_Allow_New') != 2; } + function SuggestRegister($params) + { + return !( $this->Application->LoggedIn() || $this->Application->ConfigValue('Comm_RequireLoginBeforeCheckout') ); + } + function ConfirmPasswordLink($params) { //global $m_var_list_update, $var_list_update, $objSession, $objConfig; Index: trunk/core/units/users/users_tag_processor.php =================================================================== diff -u -N -r1566 -r1929 --- trunk/core/units/users/users_tag_processor.php (.../users_tag_processor.php) (revision 1566) +++ trunk/core/units/users/users_tag_processor.php (.../users_tag_processor.php) (revision 1929) @@ -19,6 +19,11 @@ return $this->Application->ConfigValue('User_Allow_New') != 2; } + function SuggestRegister($params) + { + return !( $this->Application->LoggedIn() || $this->Application->ConfigValue('Comm_RequireLoginBeforeCheckout') ); + } + function ConfirmPasswordLink($params) { //global $m_var_list_update, $var_list_update, $objSession, $objConfig;