protected function checkPasswordExpiry() { $usergroupid = vB::getCurrentSession()->fetch_userinfo_value('usergroupid'); $usergroup = vB_Api::instanceInternal('usergroup')->fetchUsergroupByID($usergroupid); $passwordexpires = $usergroup['passwordexpires']; if (vB::getCurrentSession()->fetch_userinfo_value('userid') and $passwordexpires) { $passworddaysold = floor((vB::getRequest()->getTimeNow() - vB::GetCurrentSession()->fetch_userinfo_value('passworddate')) / 86400); if ($passworddaysold >= $passwordexpires) { if (!($this->location['settings'] or $this->location['login'] or $this->location['lostpw'])) { return array('error' => 'passwordexpired', 'args' => array($passworddaysold, vB::getDatastore()->getOption('frontendurl') . '/settings/account')); } } } return false; }