Skip to content

Commit

Permalink
Null check for UserHandler::userClassUpdate()
Browse files Browse the repository at this point in the history
  • Loading branch information
Deltik committed Jan 18, 2020
1 parent 509b9ff commit d2d0105
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions e107_handlers/user_handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -955,6 +955,7 @@ public function userClassUpdate($user, $event='userfull')
$pref = e107::getPref();
$tp = e107::getParser();

$initClassStage = isset($pref['init_class_stage']) ? intval($pref['init_class_stage']) : 0;
$initClasses = array();
$doClasses = false;
$doProbation = false;
Expand All @@ -967,14 +968,14 @@ public function userClassUpdate($user, $event='userfull')
$doProbation = true;
break;
case 'userfull':
if(!$pref['user_reg_veri'] || (intval($pref['init_class_stage']) == 2))
if(!$pref['user_reg_veri'] || ($initClassStage == 2))
{
$doClasses = true;
}
$doProbation = true;
break;
case 'userpartial' :
if(intval($pref['init_class_stage']) === 1)
if($initClassStage === 1)
{
// Set initial classes if to be done on partial signup, or if selected to add them now
$doClasses = true;
Expand Down

0 comments on commit d2d0105

Please sign in to comment.