protected function btnLogin_Click($strFormId, $strControlId, $strParameter) { $objLogin = PublicLogin::LoadByUsernamePassword(trim(strtolower($this->txtUsername->Text)), $this->txtPassword->Text); if (!$objLogin || !$objLogin->IsAllowedToUseChms()) { $this->lblMessage->Text = 'Invalid username or password.'; $this->txtUsername->Blink(); $this->txtPassword->Blink(); $this->txtUsername->Focus(); return; } if ($this->chkRemember->Checked) { setcookie('username', $objLogin->Username, time() + 60 * 60 * 24 * 14, '/', null); } else { setcookie('username', null, 1, '/', null); } QApplication::PublicLogin($objLogin); if ($objLogin->TemporaryPasswordFlag) { QApplication::Redirect('/update_password.php'); } else { QApplication::RedirectOnPublicLogin(); } }
protected function btnSave_Click($strFormId, $strControlId, $strParameter) { // Create address record(s) $objHomeAddress = $this->objHomeAddressValidator->CreateAddressRecord(); if ($this->objMailingAddressValidator) { $objMailingAddress = $this->objMailingAddressValidator->CreateAddressRecord(); } else { $objMailingAddress = null; } if (trim($this->dtxDateOfBirth->Text)) { $dttDateOfBirth = $this->dtxDateOfBirth->DateTime; } else { $dttDateOfBirth = null; } $objPerson = QApplication::$PublicLogin->ProvisionalPublicLogin->Reconcile(trim(strtolower($this->txtPassword->Text)), $this->lstQuestion->SelectedValue ? $this->lstQuestion->SelectedValue : trim($this->txtQuestion->Text), trim(strtolower($this->txtAnswer->Text)), trim($this->txtHomePhone->Text), trim($this->txtMobilePhone->Text), $objHomeAddress, $objMailingAddress, $dttDateOfBirth, $this->rblGender->SelectedValue); if ($objPerson->PublicLogin->Id != QApplication::$PublicLogin->Id) { QLog::Log(sprintf('Provisioned PublicLogin::Reconcile() matched against a Person with an existing PublicLogin: PublicLogin(%s) and Person(%s)', QApplication::$PublicLogin->Id, $objPerson->Id)); QApplication::DisplayAlert('It appears that another registration exists with the same name and home address. Before we can proceed, please contact ALCF Online Member Support at 650-625-1500 or records@alcf.net for more information. Please reference PLID ' . QApplication::$PublicLogin->Id . ' when calling.'); } else { // OptOut Email Flag if (!$this->chkBulkEmail->Checked) { $objPerson->CanEmailFlag = false; $objPerson->Save(); } else { //Upon confirmation, add them to the newletter list $objList = CommunicationList::LoadByToken('alcfweekly'); if ($objList) { if (!$objList->IsPersonAssociated($objPerson)) { $objList->AssociatePerson($objPerson); } $objPerson->Save(); } } QApplication::RedirectOnPublicLogin('/register/thankyou.php'); } }
protected function btnBack_Click($strFormId, $strControlId, $strParameter) { QApplication::RedirectOnPublicLogin(); }