Authored by hf

fixes bug to partner login

@@ -306,6 +306,9 @@ class AbstractAction extends Controller_Abstract @@ -306,6 +306,9 @@ class AbstractAction extends Controller_Abstract
306 if (isset($cookieList[1]) && is_numeric($cookieList[1])) { 306 if (isset($cookieList[1]) && is_numeric($cookieList[1])) {
307 if ($useSession) { 307 if ($useSession) {
308 $token = $this->getSession('_TOKEN'); 308 $token = $this->getSession('_TOKEN');
  309 + if (empty($token)) {
  310 + $token = $this->getCookie('_TOKEN');
  311 + }
309 if ($token === Helpers::makeToken($cookieList[1])) { 312 if ($token === Helpers::makeToken($cookieList[1])) {
310 $this->_uid = $cookieList[1]; 313 $this->_uid = $cookieList[1];
311 } 314 }
@@ -188,7 +188,7 @@ class LoginController extends AbstractAction @@ -188,7 +188,7 @@ class LoginController extends AbstractAction
188 } 188 }
189 189
190 if (isset($result['code']) && $result['code'] == 200 && !empty($result['data']['uid'])) { 190 if (isset($result['code']) && $result['code'] == 200 && !empty($result['data']['uid'])) {
191 - $this->setSession('_TOKEN', Helpers::makeToken($result['data']['uid'])); 191 + $this->setCookie('_TOKEN', Helpers::makeToken($result['data']['uid']));
192 $this->go(Helpers::syncUserSession($result['data']['uid'], $refer)); 192 $this->go(Helpers::syncUserSession($result['data']['uid'], $refer));
193 } else { 193 } else {
194 $this->go($refer); 194 $this->go($refer);
@@ -218,7 +218,7 @@ class LoginController extends AbstractAction @@ -218,7 +218,7 @@ class LoginController extends AbstractAction
218 } 218 }
219 219
220 if (isset($result['code']) && $result['code'] == 200 && !empty($result['data']['uid'])) { 220 if (isset($result['code']) && $result['code'] == 200 && !empty($result['data']['uid'])) {
221 - $this->setSession('_TOKEN', Helpers::makeToken($result['data']['uid'])); 221 + $this->setCookie('_TOKEN', Helpers::makeToken($result['data']['uid']));
222 $this->go(Helpers::syncUserSession($result['data']['uid'], $refer)); 222 $this->go(Helpers::syncUserSession($result['data']['uid'], $refer));
223 } else { 223 } else {
224 $this->go($refer); 224 $this->go($refer);
@@ -248,7 +248,7 @@ class LoginController extends AbstractAction @@ -248,7 +248,7 @@ class LoginController extends AbstractAction
248 } 248 }
249 249
250 if (isset($result['code']) && $result['code'] == 200 && !empty($result['data']['uid'])) { 250 if (isset($result['code']) && $result['code'] == 200 && !empty($result['data']['uid'])) {
251 - $this->setSession('_TOKEN', Helpers::makeToken($result['data']['uid'])); 251 + $this->setCookie('_TOKEN', Helpers::makeToken($result['data']['uid']));
252 $this->go(Helpers::syncUserSession($result['data']['uid'], $refer)); 252 $this->go(Helpers::syncUserSession($result['data']['uid'], $refer));
253 } else { 253 } else {
254 $this->go($refer); 254 $this->go($refer);