Ejemplo n.º 1
0
Archivo: c.php Proyecto: alcf/chms
 protected function btnConfirm_Click($strFormId, $strControlId, $strParameter)
 {
     $objPublicLogin = PublicLogin::LoadByUsername($this->txtUsername->Text);
     QApplication::PublicLogin($objPublicLogin);
     QApplication::Redirect('/register/details.php');
 }
Ejemplo n.º 2
0
 protected function btnRegister_Click()
 {
     $strUsernameCandidate = QApplication::Tokenize($this->txtUsername->Text, false);
     // Create the Public Login record
     $objPublicLogin = PublicLogin::CreateForPerson($this->objOnlineDonation->Person, $this->txtUsername->Text, $this->txtPassword->Text, $this->lstQuestion->SelectedValue ? $this->lstQuestion->SelectedValue : $this->txtQuestion->Text, $this->txtAnswer->Text);
     // Set the Primary Email Address
     $objPublicLogin->Person->ChangePrimaryEmailTo($_SESSION['onlineDonationEmailAddress' . $this->objOnlineDonation->Id], false);
     // Login and Redirect
     QApplication::PublicLogin($objPublicLogin);
     QApplication::Redirect('/register/thankyou.php');
 }
Ejemplo n.º 3
0
Archivo: index.php Proyecto: alcf/chms
 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();
     }
 }