Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contribution Pages: alias userID to contactID, fixes org renewal with checksum and mid #22951

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions CRM/Contribute/Form/ContributionBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,10 @@ class CRM_Contribute_Form_ContributionBase extends CRM_Core_Form {
*/
public $_contactID;

/**
* Kept only for backwards compatibility. Alias for _contactID
* @var int
*/
protected $_userID;

/**
Expand Down Expand Up @@ -230,22 +234,20 @@ public function isQuickConfig() {
* @throws \Exception
*/
public function preProcess() {

// current contribution page id
$this->_id = CRM_Utils_Request::retrieve('id', 'Positive', $this);
$this->_ccid = CRM_Utils_Request::retrieve('ccid', 'Positive', $this);

if (!$this->_id) {
// seems like the session is corrupted and/or we lost the id trail
// lets just bump this to a regular session error and redirect user to main page
$this->controller->invalidKeyRedirect();
}
$this->_emailExists = $this->get('emailExists');

// this was used prior to the cleverer this_>getContactID - unsure now
$this->_userID = CRM_Core_Session::getLoggedInContactID();

$this->_contactID = $this->_membershipContactID = $this->getContactID();
$this->_emailExists = $this->get('emailExists');
$this->_userID = $this->_contactID = $this->_membershipContactID = $this->getContactID();
$this->_mid = NULL;

if ($this->_contactID) {
$this->_mid = CRM_Utils_Request::retrieve('mid', 'Positive', $this);
if ($this->_mid) {
Expand Down