Example #1
0
 private function needSetPassword(Application $app, Database $db, \DBMappers\EmpItem $empMapper)
 {
     if ($app->isAuthorized()) {
         $empItem = $empMapper->getById($app->getEmpId(), $db);
         if ($empItem->isPasswordEqual(null) && $this->controllerName != EMPLOYEE_CONTROLLER && $this->controllerName != LOGIN_CONTROLLER) {
             $app->setStateRedirect(EMPLOYEE_URL . '/edit/' . $empItem->getId());
             return true;
         }
     }
     return false;
 }