Index: branches/5.1.x/core/units/users/users_tag_processor.php =================================================================== diff -u -N -r14241 -r14357 --- branches/5.1.x/core/units/users/users_tag_processor.php (.../users_tag_processor.php) (revision 14241) +++ branches/5.1.x/core/units/users/users_tag_processor.php (.../users_tag_processor.php) (revision 14357) @@ -1,6 +1,6 @@ Application->GetVar('user_key')); - $user =& $this->Application->recallObject('u', null, Array('skip_autoload' => true)); - /* @var $user UsersItem */ + $user_helper =& $this->Application->recallObject('UserHelper'); + /* @var $user_helper UserHelper */ + $user =& $user_helper->getUserObject(); $user->Load($passed_key, 'PwResetConfirm'); - if (!$user->isLoaded()) { + + if ( !$user->isLoaded() ) { return ; } @@ -328,10 +330,9 @@ $user->SetDBField('PwRequestTime', 0); $user->Update(); - $user_helper =& $this->Application->recallObject('UserHelper'); - /* @var $user_helper UserHelper */ - - $user_helper->loginUserById( $user->GetID() ); + if ( $user_helper->checkLoginPermission() ) { + $user_helper->loginUserById( $user->GetID() ); + } } } \ No newline at end of file Index: branches/5.1.x/core/kernel/event_manager.php =================================================================== diff -u -N -r14241 -r14357 --- branches/5.1.x/core/kernel/event_manager.php (.../event_manager.php) (revision 14241) +++ branches/5.1.x/core/kernel/event_manager.php (.../event_manager.php) (revision 14357) @@ -1,6 +1,6 @@ Application->ConfigValue('UseCronForRegularEvent')) { + if ( !$from_cron && $this->Application->ConfigValue('UseCronForRegularEvent') ) { // if RegularEvents are set to run from cron return ; } @@ -762,7 +762,7 @@ $this->runAgent($event_data); } - $this->Application->StoreVar('user_id', $user_id, true); // true for optional + $this->Application->StoreVar('user_id', $user_id, $user_id == USER_GUEST); } function runAgent($agent_data)