Skip to content

Commit

Permalink
Merge pull request #37 from Crizz0/issue/36
Browse files Browse the repository at this point in the history
Check if user needs to renew his password and abort redirect to TOU
  • Loading branch information
Crizz0 authored May 23, 2024
2 parents 8e5b0b5 + 63cdecf commit 542be8c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions event/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,12 @@ public function page_header($event)
return;
}

// Do not redirect, if user needs to renew his password
if ($this->config['chg_passforce'] && $this->auth->acl_get('u_chgpasswd') && $this->user->data['user_passchg'] < time() - ($this->config['chg_passforce'] * 86400))
{
return;
}

// At this point we have a registered user who did not accept the newest TOU.
redirect($this->helper->route('phpbbde_tou_main_controller', [], false, false, \Symfony\Component\Routing\Generator\UrlGeneratorInterface::ABSOLUTE_URL));
}
Expand Down

0 comments on commit 542be8c

Please sign in to comment.