protected function btnFirstSubmit_Click($strFormId, $strControlId, $strParameter) { if ($objPublicLogin = PublicLogin::LoadByUsername(trim(strtolower($this->txtUsername->Text)))) { } else { $this->txtUsername->Warning = 'Username does not exist'; $this->txtUsername->Blink(); $this->txtUsername->Focus(); return; } $this->txtUsername->Visible = false; $this->btnFirstSubmit->Visible = false; $this->lblFirstMessage->Visible = true; $this->lblFirstMessage->HtmlEntities = false; $this->lblFirstMessage->Text = '<p>Before we can proceed, please answer the following security question that you specified when you registered for <strong>my.alcf</strong>.</p>'; $this->lblQuestion->Visible = true; $this->lblQuestion->Name = 'Security Question'; $this->lblQuestion->Text = $objPublicLogin->LostPasswordQuestion; if (QString::LastCharacter($objPublicLogin->LostPasswordQuestion) != '?') { $this->lblQuestion->Text .= '?'; } $this->txtAnswer->Visible = true; $this->txtAnswer->Name = 'Your Answer'; $this->txtAnswer->Required = true; $this->txtAnswer->CausesValidation = $this->txtAnswer; $this->txtAnswer->Focus(); $this->btnFinalSubmit->Visible = true; $this->btnFinalSubmit->Text = 'Reset My Password'; $this->btnFinalSubmit->CausesValidation = $this->txtAnswer; $this->txtAnswer->AddAction(new QEnterKeyEvent(), new QAjaxAction('btnFinalSubmit_Click')); $this->txtAnswer->AddAction(new QEnterKeyEvent(), new QTerminateAction()); $this->btnFinalSubmit->AddAction(new QClickEvent(), new QAjaxAction('btnFinalSubmit_Click')); $this->objPublicLogin = $objPublicLogin; }
protected function btnSubmit_Click($strFormId, $strControlId, $strParameter) { $this->txtEmail->Visible = false; $this->btnSubmit->Visible = false; $this->lblMessage->Visible = true; $this->btnBack->Visible = true; $strEmail = trim(strtolower($this->txtEmail->Text)); PublicLogin::RetrieveUsernameForEmail($strEmail); $this->lblMessage->Text = '<p>We are looking to see if <strong>' . QApplication::HtmlEntities($strEmail) . '</strong> exists in the system, and if so ' . 'we will send you an email that contains your username. This should only take a moment, but please wait up to a few minnutes for delivery.</p>' . '<p>On the off-chance that the email gets caught by SPAM filters, you may also want to check your SPAM or Junk Mail folder.</p>' . '<p>If you encounter any issues, please feel free and ' . Registry::GetValue('contact_sentence_my_alcf_support') . '.</p>'; }
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(); } }
/** * Will check to see if a given username is creatable for a provisional account. If it is already * taken by a non-provisional account, this will return false. Otherwise, if it doesn't exist * (or the existing one is still provisional), it will return true. * @param $strUsername * @return boolean */ public static function IsProvisionalCreatableForUsername($strUsername) { $strUsername = QApplication::Tokenize($strUsername, false); if ($objPublicLogin = PublicLogin::LoadByUsername($strUsername)) { if ($objPublicLogin->Person) { return false; } } return true; }
protected function btnUpdate_Security_Click() { // Validate Security Stuff $blnProceed = true; $strUsernameCandidate = null; if ($this->txtUsername->Text != QApplication::$PublicLogin->Username) { $strUsernameCandidate = QApplication::Tokenize($this->txtUsername->Text, false); if ($strUsernameCandidate != trim(strtolower($this->txtUsername->Text))) { $this->txtUsername->Warning = 'Must only contain letters and numbers'; $blnProceed = false; } if (strlen($strUsernameCandidate) < 4) { $this->txtUsername->Warning = 'Must have at least 4 characters'; $blnProceed = false; } if (PublicLogin::LoadByUsername($strUsernameCandidate)) { $this->txtUsername->Warning = 'Username is taken'; $blnProceed = false; } } if ($this->txtOldPassword->Text || $this->txtNewPassword->Text || $this->txtConfirmPassword->Text) { if (!QApplication::$PublicLogin->IsPasswordValid($this->txtOldPassword->Text)) { $this->txtOldPassword->Warning = 'Password is incorrect'; $blnProceed = false; } if (strlen(trim($this->txtNewPassword->Text)) < 6) { $blnProceed = false; $this->txtNewPassword->Warning = 'Must have at least 6 characters'; } if ($this->txtNewPassword->Text != $this->txtConfirmPassword->Text) { $this->txtConfirmPassword->Warning = 'Does not match above'; $blnProceed = false; } } if (!$blnProceed) { $blnFirst = true; foreach ($this->GetErrorControls() as $objErrorControl) { $objErrorControl->Blink(); if ($blnFirst) { $blnFirst = false; $objErrorControl->Focus(); } } return; } // Update Stuff if ($strUsernameCandidate) { QApplication::$PublicLogin->Username = $strUsernameCandidate; } QApplication::$PublicLogin->LostPasswordQuestion = trim($this->txtQuestion->Text); QApplication::$PublicLogin->LostPasswordAnswer = strtolower(trim($this->txtAnswer->Text)); if ($this->txtNewPassword->Text) { QApplication::$PublicLogin->SetPassword($this->txtNewPassword->Text); QApplication::$PublicLogin->TemporaryPasswordFlag = false; } QApplication::$PublicLogin->Save(); // Refresh Stuff $this->mctPerson->Person->Reload(); $this->Refresh(); // Cleanup Stuff $this->btnCancel_Security_Click(); }
/** * Static Helper Method to Create using PK arguments * You must pass in the PK arguments on an object to load, or leave it blank to create a new one. * If you want to load via QueryString or PathInfo, use the CreateFromQueryString or CreateFromPathInfo * static helper methods. Finally, specify a CreateType to define whether or not we are only allowed to * edit, or if we are also allowed to create a new one, etc. * * @param mixed $objParentObject QForm or QPanel which will be using this PublicLoginMetaControl * @param integer $intId primary key value * @param QMetaControlCreateType $intCreateType rules governing PublicLogin object creation - defaults to CreateOrEdit * @return PublicLoginMetaControl */ public static function Create($objParentObject, $intId = null, $intCreateType = QMetaControlCreateType::CreateOrEdit) { // Attempt to Load from PK Arguments if (strlen($intId)) { $objPublicLogin = PublicLogin::Load($intId); // PublicLogin was found -- return it! if ($objPublicLogin) { return new PublicLoginMetaControl($objParentObject, $objPublicLogin); } else { if ($intCreateType != QMetaControlCreateType::CreateOnRecordNotFound) { throw new QCallerException('Could not find a PublicLogin object with PK arguments: ' . $intId); } } // If EditOnly is specified, throw an exception } else { if ($intCreateType == QMetaControlCreateType::EditOnly) { throw new QCallerException('No PK arguments specified'); } } // If we are here, then we need to create a new record return new PublicLoginMetaControl($objParentObject, new PublicLogin()); }
public static function GetSoapArrayFromArray($objArray) { if (!$objArray) { return null; } $objArrayToReturn = array(); foreach ($objArray as $objObject) { array_push($objArrayToReturn, PublicLogin::GetSoapObjectFromObject($objObject, true)); } return unserialize(serialize($objArrayToReturn)); }
protected function btnRegister_Click($strFormId, $strControlId, $strParameter) { $strUsernameCandidate = QApplication::Tokenize($this->txtUsername->Text, false); $objProvisionalPublicLogin = PublicLogin::CreateProvisional($strUsernameCandidate, $this->txtEmail->Text, $this->txtFirstName->Text, $this->txtLastName->Text); QApplication::Redirect($objProvisionalPublicLogin->AwaitingConfirmationUrl); }
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'); }
public static function GetSoapObjectFromObject($objObject, $blnBindRelatedObjects) { if ($objObject->objPublicLogin) { $objObject->objPublicLogin = PublicLogin::GetSoapObjectFromObject($objObject->objPublicLogin, false); } else { if (!$blnBindRelatedObjects) { $objObject->intPublicLoginId = null; } } return $objObject; }
/** * Override method to perform a property "Get" * This will get the value of $strName * * @param string $strName Name of the property to get * @return mixed */ public function __get($strName) { switch ($strName) { /////////////////// // Member Variables /////////////////// case 'Id': // Gets the value for intId (Read-Only PK) // @return integer return $this->intId; case 'MembershipStatusTypeId': // Gets the value for intMembershipStatusTypeId (Not Null) // @return integer return $this->intMembershipStatusTypeId; case 'MaritalStatusTypeId': // Gets the value for intMaritalStatusTypeId (Not Null) // @return integer return $this->intMaritalStatusTypeId; case 'FirstName': // Gets the value for strFirstName // @return string return $this->strFirstName; case 'MiddleName': // Gets the value for strMiddleName // @return string return $this->strMiddleName; case 'LastName': // Gets the value for strLastName // @return string return $this->strLastName; case 'MailingLabel': // Gets the value for strMailingLabel // @return string return $this->strMailingLabel; case 'PriorLastNames': // Gets the value for strPriorLastNames // @return string return $this->strPriorLastNames; case 'Nickname': // Gets the value for strNickname // @return string return $this->strNickname; case 'Title': // Gets the value for strTitle // @return string return $this->strTitle; case 'Suffix': // Gets the value for strSuffix // @return string return $this->strSuffix; case 'Gender': // Gets the value for strGender // @return string return $this->strGender; case 'DateOfBirth': // Gets the value for dttDateOfBirth // @return QDateTime return $this->dttDateOfBirth; case 'DobYearApproximateFlag': // Gets the value for blnDobYearApproximateFlag // @return boolean return $this->blnDobYearApproximateFlag; case 'DobGuessedFlag': // Gets the value for blnDobGuessedFlag // @return boolean return $this->blnDobGuessedFlag; case 'Age': // Gets the value for intAge // @return integer return $this->intAge; case 'DeceasedFlag': // Gets the value for blnDeceasedFlag (Not Null) // @return boolean return $this->blnDeceasedFlag; case 'DateDeceased': // Gets the value for dttDateDeceased // @return QDateTime return $this->dttDateDeceased; case 'CurrentHeadShotId': // Gets the value for intCurrentHeadShotId (Unique) // @return integer return $this->intCurrentHeadShotId; case 'MailingAddressId': // Gets the value for intMailingAddressId // @return integer return $this->intMailingAddressId; case 'StewardshipAddressId': // Gets the value for intStewardshipAddressId // @return integer return $this->intStewardshipAddressId; case 'PrimaryPhoneId': // Gets the value for intPrimaryPhoneId // @return integer return $this->intPrimaryPhoneId; case 'PrimaryEmailId': // Gets the value for intPrimaryEmailId (Unique) // @return integer return $this->intPrimaryEmailId; case 'CanMailFlag': // Gets the value for blnCanMailFlag // @return boolean return $this->blnCanMailFlag; case 'CanPhoneFlag': // Gets the value for blnCanPhoneFlag // @return boolean return $this->blnCanPhoneFlag; case 'CanEmailFlag': // Gets the value for blnCanEmailFlag // @return boolean return $this->blnCanEmailFlag; case 'PrimaryAddressText': // Gets the value for strPrimaryAddressText // @return string return $this->strPrimaryAddressText; case 'PrimaryCityText': // Gets the value for strPrimaryCityText // @return string return $this->strPrimaryCityText; case 'PrimaryStateText': // Gets the value for strPrimaryStateText // @return string return $this->strPrimaryStateText; case 'PrimaryZipCodeText': // Gets the value for strPrimaryZipCodeText // @return string return $this->strPrimaryZipCodeText; case 'PrimaryPhoneText': // Gets the value for strPrimaryPhoneText // @return string return $this->strPrimaryPhoneText; case 'PublicCreationFlag': // Gets the value for blnPublicCreationFlag // @return boolean return $this->blnPublicCreationFlag; case 'CoPrimary': // Gets the value for intCoPrimary // @return integer return $this->intCoPrimary; /////////////////// // Member Objects /////////////////// /////////////////// // Member Objects /////////////////// case 'CurrentHeadShot': // Gets the value for the HeadShot object referenced by intCurrentHeadShotId (Unique) // @return HeadShot try { if (!$this->objCurrentHeadShot && !is_null($this->intCurrentHeadShotId)) { $this->objCurrentHeadShot = HeadShot::Load($this->intCurrentHeadShotId); } return $this->objCurrentHeadShot; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'MailingAddress': // Gets the value for the Address object referenced by intMailingAddressId // @return Address try { if (!$this->objMailingAddress && !is_null($this->intMailingAddressId)) { $this->objMailingAddress = Address::Load($this->intMailingAddressId); } return $this->objMailingAddress; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'StewardshipAddress': // Gets the value for the Address object referenced by intStewardshipAddressId // @return Address try { if (!$this->objStewardshipAddress && !is_null($this->intStewardshipAddressId)) { $this->objStewardshipAddress = Address::Load($this->intStewardshipAddressId); } return $this->objStewardshipAddress; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'PrimaryPhone': // Gets the value for the Phone object referenced by intPrimaryPhoneId // @return Phone try { if (!$this->objPrimaryPhone && !is_null($this->intPrimaryPhoneId)) { $this->objPrimaryPhone = Phone::Load($this->intPrimaryPhoneId); } return $this->objPrimaryPhone; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'PrimaryEmail': // Gets the value for the Email object referenced by intPrimaryEmailId (Unique) // @return Email try { if (!$this->objPrimaryEmail && !is_null($this->intPrimaryEmailId)) { $this->objPrimaryEmail = Email::Load($this->intPrimaryEmailId); } return $this->objPrimaryEmail; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'CoPrimaryObject': // Gets the value for the Person object referenced by intCoPrimary // @return Person try { if (!$this->objCoPrimaryObject && !is_null($this->intCoPrimary)) { $this->objCoPrimaryObject = Person::Load($this->intCoPrimary); } return $this->objCoPrimaryObject; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'HouseholdAsHead': // Gets the value for the Household object that uniquely references this Person // by objHouseholdAsHead (Unique) // @return Household try { if ($this->objHouseholdAsHead === false) { // We've attempted early binding -- and the reverse reference object does not exist return null; } if (!$this->objHouseholdAsHead) { $this->objHouseholdAsHead = Household::LoadByHeadPersonId($this->intId); } return $this->objHouseholdAsHead; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'PublicLogin': // Gets the value for the PublicLogin object that uniquely references this Person // by objPublicLogin (Unique) // @return PublicLogin try { if ($this->objPublicLogin === false) { // We've attempted early binding -- and the reverse reference object does not exist return null; } if (!$this->objPublicLogin) { $this->objPublicLogin = PublicLogin::LoadByPersonId($this->intId); } return $this->objPublicLogin; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } //////////////////////////// // Virtual Object References (Many to Many and Reverse References) // (If restored via a "Many-to" expansion) //////////////////////////// //////////////////////////// // Virtual Object References (Many to Many and Reverse References) // (If restored via a "Many-to" expansion) //////////////////////////// case '_CheckingAccountLookup': // Gets the value for the private _objCheckingAccountLookup (Read-Only) // if set due to an expansion on the checkingaccountlookup_person_assn association table // @return CheckingAccountLookup return $this->_objCheckingAccountLookup; case '_CheckingAccountLookupArray': // Gets the value for the private _objCheckingAccountLookupArray (Read-Only) // if set due to an ExpandAsArray on the checkingaccountlookup_person_assn association table // @return CheckingAccountLookup[] return (array) $this->_objCheckingAccountLookupArray; case '_CommunicationList': // Gets the value for the private _objCommunicationList (Read-Only) // if set due to an expansion on the communicationlist_person_assn association table // @return CommunicationList return $this->_objCommunicationList; case '_CommunicationListArray': // Gets the value for the private _objCommunicationListArray (Read-Only) // if set due to an ExpandAsArray on the communicationlist_person_assn association table // @return CommunicationList[] return (array) $this->_objCommunicationListArray; case '_NameItem': // Gets the value for the private _objNameItem (Read-Only) // if set due to an expansion on the person_nameitem_assn association table // @return NameItem return $this->_objNameItem; case '_NameItemArray': // Gets the value for the private _objNameItemArray (Read-Only) // if set due to an ExpandAsArray on the person_nameitem_assn association table // @return NameItem[] return (array) $this->_objNameItemArray; case '_Address': // Gets the value for the private _objAddress (Read-Only) // if set due to an expansion on the address.person_id reverse relationship // @return Address return $this->_objAddress; case '_AddressArray': // Gets the value for the private _objAddressArray (Read-Only) // if set due to an ExpandAsArray on the address.person_id reverse relationship // @return Address[] return (array) $this->_objAddressArray; case '_AttributeValue': // Gets the value for the private _objAttributeValue (Read-Only) // if set due to an expansion on the attribute_value.person_id reverse relationship // @return AttributeValue return $this->_objAttributeValue; case '_AttributeValueArray': // Gets the value for the private _objAttributeValueArray (Read-Only) // if set due to an ExpandAsArray on the attribute_value.person_id reverse relationship // @return AttributeValue[] return (array) $this->_objAttributeValueArray; case '_ClassRegistration': // Gets the value for the private _objClassRegistration (Read-Only) // if set due to an expansion on the class_registration.person_id reverse relationship // @return ClassRegistration return $this->_objClassRegistration; case '_ClassRegistrationArray': // Gets the value for the private _objClassRegistrationArray (Read-Only) // if set due to an ExpandAsArray on the class_registration.person_id reverse relationship // @return ClassRegistration[] return (array) $this->_objClassRegistrationArray; case '_Comment': // Gets the value for the private _objComment (Read-Only) // if set due to an expansion on the comment.person_id reverse relationship // @return Comment return $this->_objComment; case '_CommentArray': // Gets the value for the private _objCommentArray (Read-Only) // if set due to an ExpandAsArray on the comment.person_id reverse relationship // @return Comment[] return (array) $this->_objCommentArray; case '_Email': // Gets the value for the private _objEmail (Read-Only) // if set due to an expansion on the email.person_id reverse relationship // @return Email return $this->_objEmail; case '_EmailArray': // Gets the value for the private _objEmailArray (Read-Only) // if set due to an ExpandAsArray on the email.person_id reverse relationship // @return Email[] return (array) $this->_objEmailArray; case '_EmailMessageRoute': // Gets the value for the private _objEmailMessageRoute (Read-Only) // if set due to an expansion on the email_message_route.person_id reverse relationship // @return EmailMessageRoute return $this->_objEmailMessageRoute; case '_EmailMessageRouteArray': // Gets the value for the private _objEmailMessageRouteArray (Read-Only) // if set due to an ExpandAsArray on the email_message_route.person_id reverse relationship // @return EmailMessageRoute[] return (array) $this->_objEmailMessageRouteArray; case '_GroupAuthorizedSender': // Gets the value for the private _objGroupAuthorizedSender (Read-Only) // if set due to an expansion on the group_authorized_sender.person_id reverse relationship // @return GroupAuthorizedSender return $this->_objGroupAuthorizedSender; case '_GroupAuthorizedSenderArray': // Gets the value for the private _objGroupAuthorizedSenderArray (Read-Only) // if set due to an ExpandAsArray on the group_authorized_sender.person_id reverse relationship // @return GroupAuthorizedSender[] return (array) $this->_objGroupAuthorizedSenderArray; case '_GroupParticipation': // Gets the value for the private _objGroupParticipation (Read-Only) // if set due to an expansion on the group_participation.person_id reverse relationship // @return GroupParticipation return $this->_objGroupParticipation; case '_GroupParticipationArray': // Gets the value for the private _objGroupParticipationArray (Read-Only) // if set due to an ExpandAsArray on the group_participation.person_id reverse relationship // @return GroupParticipation[] return (array) $this->_objGroupParticipationArray; case '_HeadShot': // Gets the value for the private _objHeadShot (Read-Only) // if set due to an expansion on the head_shot.person_id reverse relationship // @return HeadShot return $this->_objHeadShot; case '_HeadShotArray': // Gets the value for the private _objHeadShotArray (Read-Only) // if set due to an ExpandAsArray on the head_shot.person_id reverse relationship // @return HeadShot[] return (array) $this->_objHeadShotArray; case '_HouseholdParticipation': // Gets the value for the private _objHouseholdParticipation (Read-Only) // if set due to an expansion on the household_participation.person_id reverse relationship // @return HouseholdParticipation return $this->_objHouseholdParticipation; case '_HouseholdParticipationArray': // Gets the value for the private _objHouseholdParticipationArray (Read-Only) // if set due to an ExpandAsArray on the household_participation.person_id reverse relationship // @return HouseholdParticipation[] return (array) $this->_objHouseholdParticipationArray; case '_Marriage': // Gets the value for the private _objMarriage (Read-Only) // if set due to an expansion on the marriage.person_id reverse relationship // @return Marriage return $this->_objMarriage; case '_MarriageArray': // Gets the value for the private _objMarriageArray (Read-Only) // if set due to an ExpandAsArray on the marriage.person_id reverse relationship // @return Marriage[] return (array) $this->_objMarriageArray; case '_MarriageAsMarriedTo': // Gets the value for the private _objMarriageAsMarriedTo (Read-Only) // if set due to an expansion on the marriage.married_to_person_id reverse relationship // @return Marriage return $this->_objMarriageAsMarriedTo; case '_MarriageAsMarriedToArray': // Gets the value for the private _objMarriageAsMarriedToArray (Read-Only) // if set due to an ExpandAsArray on the marriage.married_to_person_id reverse relationship // @return Marriage[] return (array) $this->_objMarriageAsMarriedToArray; case '_Membership': // Gets the value for the private _objMembership (Read-Only) // if set due to an expansion on the membership.person_id reverse relationship // @return Membership return $this->_objMembership; case '_MembershipArray': // Gets the value for the private _objMembershipArray (Read-Only) // if set due to an ExpandAsArray on the membership.person_id reverse relationship // @return Membership[] return (array) $this->_objMembershipArray; case '_OnlineDonation': // Gets the value for the private _objOnlineDonation (Read-Only) // if set due to an expansion on the online_donation.person_id reverse relationship // @return OnlineDonation return $this->_objOnlineDonation; case '_OnlineDonationArray': // Gets the value for the private _objOnlineDonationArray (Read-Only) // if set due to an ExpandAsArray on the online_donation.person_id reverse relationship // @return OnlineDonation[] return (array) $this->_objOnlineDonationArray; case '_OtherContactInfo': // Gets the value for the private _objOtherContactInfo (Read-Only) // if set due to an expansion on the other_contact_info.person_id reverse relationship // @return OtherContactInfo return $this->_objOtherContactInfo; case '_OtherContactInfoArray': // Gets the value for the private _objOtherContactInfoArray (Read-Only) // if set due to an ExpandAsArray on the other_contact_info.person_id reverse relationship // @return OtherContactInfo[] return (array) $this->_objOtherContactInfoArray; case '_ParentPagerIndividual': // Gets the value for the private _objParentPagerIndividual (Read-Only) // if set due to an expansion on the parent_pager_individual.person_id reverse relationship // @return ParentPagerIndividual return $this->_objParentPagerIndividual; case '_ParentPagerIndividualArray': // Gets the value for the private _objParentPagerIndividualArray (Read-Only) // if set due to an ExpandAsArray on the parent_pager_individual.person_id reverse relationship // @return ParentPagerIndividual[] return (array) $this->_objParentPagerIndividualArray; case '_PersonAsCoPrimary': // Gets the value for the private _objPersonAsCoPrimary (Read-Only) // if set due to an expansion on the person.co_primary reverse relationship // @return Person return $this->_objPersonAsCoPrimary; case '_PersonAsCoPrimaryArray': // Gets the value for the private _objPersonAsCoPrimaryArray (Read-Only) // if set due to an ExpandAsArray on the person.co_primary reverse relationship // @return Person[] return (array) $this->_objPersonAsCoPrimaryArray; case '_Phone': // Gets the value for the private _objPhone (Read-Only) // if set due to an expansion on the phone.person_id reverse relationship // @return Phone return $this->_objPhone; case '_PhoneArray': // Gets the value for the private _objPhoneArray (Read-Only) // if set due to an ExpandAsArray on the phone.person_id reverse relationship // @return Phone[] return (array) $this->_objPhoneArray; case '_Relationship': // Gets the value for the private _objRelationship (Read-Only) // if set due to an expansion on the relationship.person_id reverse relationship // @return Relationship return $this->_objRelationship; case '_RelationshipArray': // Gets the value for the private _objRelationshipArray (Read-Only) // if set due to an ExpandAsArray on the relationship.person_id reverse relationship // @return Relationship[] return (array) $this->_objRelationshipArray; case '_RelationshipAsRelatedTo': // Gets the value for the private _objRelationshipAsRelatedTo (Read-Only) // if set due to an expansion on the relationship.related_to_person_id reverse relationship // @return Relationship return $this->_objRelationshipAsRelatedTo; case '_RelationshipAsRelatedToArray': // Gets the value for the private _objRelationshipAsRelatedToArray (Read-Only) // if set due to an ExpandAsArray on the relationship.related_to_person_id reverse relationship // @return Relationship[] return (array) $this->_objRelationshipAsRelatedToArray; case '_SearchQuery': // Gets the value for the private _objSearchQuery (Read-Only) // if set due to an expansion on the search_query.person_id reverse relationship // @return SearchQuery return $this->_objSearchQuery; case '_SearchQueryArray': // Gets the value for the private _objSearchQueryArray (Read-Only) // if set due to an ExpandAsArray on the search_query.person_id reverse relationship // @return SearchQuery[] return (array) $this->_objSearchQueryArray; case '_SignupEntry': // Gets the value for the private _objSignupEntry (Read-Only) // if set due to an expansion on the signup_entry.person_id reverse relationship // @return SignupEntry return $this->_objSignupEntry; case '_SignupEntryArray': // Gets the value for the private _objSignupEntryArray (Read-Only) // if set due to an ExpandAsArray on the signup_entry.person_id reverse relationship // @return SignupEntry[] return (array) $this->_objSignupEntryArray; case '_SignupEntryAsSignupBy': // Gets the value for the private _objSignupEntryAsSignupBy (Read-Only) // if set due to an expansion on the signup_entry.signup_by_person_id reverse relationship // @return SignupEntry return $this->_objSignupEntryAsSignupBy; case '_SignupEntryAsSignupByArray': // Gets the value for the private _objSignupEntryAsSignupByArray (Read-Only) // if set due to an ExpandAsArray on the signup_entry.signup_by_person_id reverse relationship // @return SignupEntry[] return (array) $this->_objSignupEntryAsSignupByArray; case '_StewardshipContribution': // Gets the value for the private _objStewardshipContribution (Read-Only) // if set due to an expansion on the stewardship_contribution.person_id reverse relationship // @return StewardshipContribution return $this->_objStewardshipContribution; case '_StewardshipContributionArray': // Gets the value for the private _objStewardshipContributionArray (Read-Only) // if set due to an ExpandAsArray on the stewardship_contribution.person_id reverse relationship // @return StewardshipContribution[] return (array) $this->_objStewardshipContributionArray; case '_StewardshipPledge': // Gets the value for the private _objStewardshipPledge (Read-Only) // if set due to an expansion on the stewardship_pledge.person_id reverse relationship // @return StewardshipPledge return $this->_objStewardshipPledge; case '_StewardshipPledgeArray': // Gets the value for the private _objStewardshipPledgeArray (Read-Only) // if set due to an ExpandAsArray on the stewardship_pledge.person_id reverse relationship // @return StewardshipPledge[] return (array) $this->_objStewardshipPledgeArray; case '_StewardshipPostLineItem': // Gets the value for the private _objStewardshipPostLineItem (Read-Only) // if set due to an expansion on the stewardship_post_line_item.person_id reverse relationship // @return StewardshipPostLineItem return $this->_objStewardshipPostLineItem; case '_StewardshipPostLineItemArray': // Gets the value for the private _objStewardshipPostLineItemArray (Read-Only) // if set due to an ExpandAsArray on the stewardship_post_line_item.person_id reverse relationship // @return StewardshipPostLineItem[] return (array) $this->_objStewardshipPostLineItemArray; case '__Restored': return $this->__blnRestored; default: try { return parent::__get($strName); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } } }
protected function btnConfirm_Click($strFormId, $strControlId, $strParameter) { $objPublicLogin = PublicLogin::LoadByUsername($this->txtUsername->Text); QApplication::PublicLogin($objPublicLogin); QApplication::Redirect('/register/details.php'); }
/** * Refresh this MetaControl with Data from the local ProvisionalPublicLogin object. * @param boolean $blnReload reload ProvisionalPublicLogin from the database * @return void */ public function Refresh($blnReload = false) { if ($blnReload) { $this->objProvisionalPublicLogin->Reload(); } if ($this->lstPublicLogin) { $this->lstPublicLogin->RemoveAllItems(); if (!$this->blnEditMode) { $this->lstPublicLogin->AddItem(QApplication::Translate('- Select One -'), null); } $objPublicLoginArray = PublicLogin::LoadAll(); if ($objPublicLoginArray) { foreach ($objPublicLoginArray as $objPublicLogin) { $objListItem = new QListItem($objPublicLogin->__toString(), $objPublicLogin->Id); if ($this->objProvisionalPublicLogin->PublicLogin && $this->objProvisionalPublicLogin->PublicLogin->Id == $objPublicLogin->Id) { $objListItem->Selected = true; } $this->lstPublicLogin->AddItem($objListItem); } } } if ($this->lblPublicLoginId) { $this->lblPublicLoginId->Text = $this->objProvisionalPublicLogin->PublicLogin ? $this->objProvisionalPublicLogin->PublicLogin->__toString() : null; } if ($this->txtFirstName) { $this->txtFirstName->Text = $this->objProvisionalPublicLogin->FirstName; } if ($this->lblFirstName) { $this->lblFirstName->Text = $this->objProvisionalPublicLogin->FirstName; } if ($this->txtLastName) { $this->txtLastName->Text = $this->objProvisionalPublicLogin->LastName; } if ($this->lblLastName) { $this->lblLastName->Text = $this->objProvisionalPublicLogin->LastName; } if ($this->txtEmailAddress) { $this->txtEmailAddress->Text = $this->objProvisionalPublicLogin->EmailAddress; } if ($this->lblEmailAddress) { $this->lblEmailAddress->Text = $this->objProvisionalPublicLogin->EmailAddress; } if ($this->txtUrlHash) { $this->txtUrlHash->Text = $this->objProvisionalPublicLogin->UrlHash; } if ($this->lblUrlHash) { $this->lblUrlHash->Text = $this->objProvisionalPublicLogin->UrlHash; } if ($this->txtConfirmationCode) { $this->txtConfirmationCode->Text = $this->objProvisionalPublicLogin->ConfirmationCode; } if ($this->lblConfirmationCode) { $this->lblConfirmationCode->Text = $this->objProvisionalPublicLogin->ConfirmationCode; } }
<?php require dirname(__FILE__) . '/../includes/prepend.inc.php'; if (PublicLogin::CountAll() > 0) { print 'System OK'; }
/** * Main utility method to aid with data binding. It is used by the default BindAllRows() databinder but * could and should be used by any custom databind methods that would be used for instances of this * MetaDataGrid, by simply passing in a custom QQCondition and/or QQClause. * * If a paginator is set on this DataBinder, it will use it. If not, then no pagination will be used. * It will also perform any sorting (if applicable). * * @param QQCondition $objConditions override the default condition of QQ::All() to the query, itself * @param QQClause[] $objOptionalClauses additional optional QQClause object or array of QQClause objects for the query * @return void */ public function MetaDataBinder(QQCondition $objCondition = null, $objOptionalClauses = null) { // Setup input parameters to default values if none passed in if (!$objCondition) { $objCondition = QQ::All(); } $objClauses = $objOptionalClauses ? $objOptionalClauses : array(); // We need to first set the TotalItemCount, which will affect the calcuation of LimitClause below if ($this->Paginator) { $this->TotalItemCount = PublicLogin::QueryCount($objCondition, $objClauses); } // If a column is selected to be sorted, and if that column has a OrderByClause set on it, then let's add // the OrderByClause to the $objClauses array if ($objClause = $this->OrderByClause) { array_push($objClauses, $objClause); } // Add the LimitClause information, as well if ($objClause = $this->LimitClause) { array_push($objClauses, $objClause); } // Set the DataSource to be a Query result from PublicLogin, given the clauses above $this->DataSource = PublicLogin::QueryArray($objCondition, $objClauses); }
/** * This will save this object's Person instance, * updating only the fields which have had a control created for it. */ public function SavePerson() { try { // Update any fields for controls that have been created if ($this->lstMembershipStatusType) { $this->objPerson->MembershipStatusTypeId = $this->lstMembershipStatusType->SelectedValue; } if ($this->lstMaritalStatusType) { $this->objPerson->MaritalStatusTypeId = $this->lstMaritalStatusType->SelectedValue; } if ($this->txtFirstName) { $this->objPerson->FirstName = $this->txtFirstName->Text; } if ($this->txtMiddleName) { $this->objPerson->MiddleName = $this->txtMiddleName->Text; } if ($this->txtLastName) { $this->objPerson->LastName = $this->txtLastName->Text; } if ($this->txtMailingLabel) { $this->objPerson->MailingLabel = $this->txtMailingLabel->Text; } if ($this->txtPriorLastNames) { $this->objPerson->PriorLastNames = $this->txtPriorLastNames->Text; } if ($this->txtNickname) { $this->objPerson->Nickname = $this->txtNickname->Text; } if ($this->txtTitle) { $this->objPerson->Title = $this->txtTitle->Text; } if ($this->txtSuffix) { $this->objPerson->Suffix = $this->txtSuffix->Text; } if ($this->txtGender) { $this->objPerson->Gender = $this->txtGender->Text; } if ($this->calDateOfBirth) { $this->objPerson->DateOfBirth = $this->calDateOfBirth->DateTime; } if ($this->chkDobYearApproximateFlag) { $this->objPerson->DobYearApproximateFlag = $this->chkDobYearApproximateFlag->Checked; } if ($this->chkDobGuessedFlag) { $this->objPerson->DobGuessedFlag = $this->chkDobGuessedFlag->Checked; } if ($this->txtAge) { $this->objPerson->Age = $this->txtAge->Text; } if ($this->chkDeceasedFlag) { $this->objPerson->DeceasedFlag = $this->chkDeceasedFlag->Checked; } if ($this->calDateDeceased) { $this->objPerson->DateDeceased = $this->calDateDeceased->DateTime; } if ($this->lstCurrentHeadShot) { $this->objPerson->CurrentHeadShotId = $this->lstCurrentHeadShot->SelectedValue; } if ($this->lstMailingAddress) { $this->objPerson->MailingAddressId = $this->lstMailingAddress->SelectedValue; } if ($this->lstStewardshipAddress) { $this->objPerson->StewardshipAddressId = $this->lstStewardshipAddress->SelectedValue; } if ($this->lstPrimaryPhone) { $this->objPerson->PrimaryPhoneId = $this->lstPrimaryPhone->SelectedValue; } if ($this->lstPrimaryEmail) { $this->objPerson->PrimaryEmailId = $this->lstPrimaryEmail->SelectedValue; } if ($this->chkCanMailFlag) { $this->objPerson->CanMailFlag = $this->chkCanMailFlag->Checked; } if ($this->chkCanPhoneFlag) { $this->objPerson->CanPhoneFlag = $this->chkCanPhoneFlag->Checked; } if ($this->chkCanEmailFlag) { $this->objPerson->CanEmailFlag = $this->chkCanEmailFlag->Checked; } if ($this->txtPrimaryAddressText) { $this->objPerson->PrimaryAddressText = $this->txtPrimaryAddressText->Text; } if ($this->txtPrimaryCityText) { $this->objPerson->PrimaryCityText = $this->txtPrimaryCityText->Text; } if ($this->txtPrimaryStateText) { $this->objPerson->PrimaryStateText = $this->txtPrimaryStateText->Text; } if ($this->txtPrimaryZipCodeText) { $this->objPerson->PrimaryZipCodeText = $this->txtPrimaryZipCodeText->Text; } if ($this->txtPrimaryPhoneText) { $this->objPerson->PrimaryPhoneText = $this->txtPrimaryPhoneText->Text; } if ($this->chkPublicCreationFlag) { $this->objPerson->PublicCreationFlag = $this->chkPublicCreationFlag->Checked; } if ($this->lstCoPrimaryObject) { $this->objPerson->CoPrimary = $this->lstCoPrimaryObject->SelectedValue; } // Update any UniqueReverseReferences (if any) for controls that have been created for it if ($this->lstHouseholdAsHead) { $this->objPerson->HouseholdAsHead = Household::Load($this->lstHouseholdAsHead->SelectedValue); } if ($this->lstPublicLogin) { $this->objPerson->PublicLogin = PublicLogin::Load($this->lstPublicLogin->SelectedValue); } // Save the Person object $this->objPerson->Save(); // Finally, update any ManyToManyReferences (if any) $this->lstCheckingAccountLookups_Update(); $this->lstCommunicationLists_Update(); $this->lstNameItems_Update(); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } }