Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 5.0.2
-
Component/s: None
-
Labels:None
Description
To reproduce:
- Create a client
- Sign the client up as an affiliate
- Access the order form as an unauthenticated user following the affiliates referral link
- Signup and place an order
- Sign the new user up as an affiliate
- View the client's referral list in the client interface and see that it shows the referrals from the first client not the second
To resolve update order/controllers/referrals.php line 37
if (!($affiliate = $this->OrderAffiliates->getByClientId($this->client->id))) {
With
if (!($affiliate = $this->OrderAffiliates->getByClientId($this->Session->read('blesta_client_id')))) {
It seems that order/controllers/payouts.php also uses $this->client which may not be set. These also should be replaced by using $this->Session->read('blesta_client_id') or the client object fetched with it.