public function actionActivateaccount()
 {
     $registeredUserID = 0;
     $emailAddress = "";
     $activationCode = "";
     if (isset($_GET['registeredUserID']) && isset($_GET['activationCode']) && isset($_GET['emailAddress'])) {
         $registeredUserID = $_GET['registeredUserID'];
         $activationCode = $_GET['activationCode'];
         $emailAddress = $_GET['emailAddress'];
         if (strlen($emailAddress) > 0) {
             $isValidEmailAddress = DefaultController::isValidEmailAddress($emailAddress);
             if ($isValidEmailAddress == true) {
                 if (strlen($activationCode) > 0) {
                     $_AccountRegisteredUsersForm = new AccountRegisteredUsersForm();
                     $activationCodeResult = $_AccountRegisteredUsersForm->getActivationCodeAndStatusByID($registeredUserID);
                     if (!empty($activationCode) || !is_null($activationCode)) {
                         $registeredUserStatus = $activationCodeResult['Status'];
                         if ((int) $registeredUserStatus == DefaultForm::ACCOUNT_STATUS_REGISTERED_USER_INACTIVE) {
                             if ($activationCode == $activationCodeResult['ActivationCode']) {
                                 $_AccountRegisteredUserDetailsForm = new AccountRegisteredUserDetailsForm();
                                 $fullName = $_AccountRegisteredUserDetailsForm->getFullNameByIDAndEmailAddress($registeredUserID, $emailAddress);
                                 if (!empty($fullName) || !is_null($fullName)) {
                                     $lastName = $fullName['LastName'];
                                     $firstName = $fullName['FirstName'];
                                     $middleName = $fullName['MiddleName'];
                                     $status = DefaultForm::ACCOUNT_STATUS_REGISTERED_USER_ACTIVE;
                                     $updateRegisteredUserAccount = $_AccountRegisteredUsersForm->updateStatusAndActivationCode($registeredUserID, $emailAddress, $status, $lastName, $firstName, $middleName);
                                     $returnData = array('status' => $updateRegisteredUserAccount['status'], 'message' => $updateRegisteredUserAccount['message']);
                                 } else {
                                     $returnData = array('status' => DefaultForm::ERROR_CODE_SYSTEM_DEFAULT, 'message' => 'Could not retrieve account info!');
                                 }
                             } else {
                                 $returnData = array('status' => DefaultForm::ERROR_CODE_SYSTEM_DEFAULT, 'message' => 'Activation code is invalid!');
                             }
                         } else {
                             $returnData = array('status' => 2, 'message' => 'Seems you are trying to activate an already activated account, locked, or deleted! Make sure that you are activating an inactive account.');
                         }
                     } else {
                         $returnData = array('status' => DefaultForm::ERROR_CODE_SYSTEM_DEFAULT, 'message' => 'Activation code is invalid!');
                     }
                 } else {
                     $returnData = array('status' => DefaultForm::ERROR_CODE_SYSTEM_DEFAULT, 'message' => 'Activation code was not found!');
                 }
             } else {
                 $returnData = array('status' => DefaultForm::ERROR_CODE_SYSTEM_DEFAULT, 'message' => 'Email address is invalid!');
             }
         } else {
             $returnData = array('status' => DefaultForm::ERROR_CODE_SYSTEM_DEFAULT, 'message' => 'Email address was not found!');
         }
     } else {
         $returnData = array('status' => DefaultForm::ERROR_CODE_SYSTEM_DEFAULT, 'message' => 'Invalid request!');
     }
     return $this->render('activateaccount', array('returnData' => $returnData, 'registeredUserID' => $registeredUserID, 'emailAddress' => $emailAddress, 'activationCode' => $activationCode));
 }