code review by hf: fixes bug to coupon newuser second times
Showing
1 changed file
with
2 additions
and
2 deletions
@@ -632,10 +632,10 @@ class CouponController extends HuodongAction | @@ -632,10 +632,10 @@ class CouponController extends HuodongAction | ||
632 | } | 632 | } |
633 | 633 | ||
634 | /* 判断用户是否登录 */ | 634 | /* 判断用户是否登录 */ |
635 | - $uid = $this->getSession(self::SESSION_UID); | ||
636 | - if (!$uid) { | ||
637 | $uid = $this->getUid(); | 635 | $uid = $this->getUid(); |
638 | if (!$uid) { | 636 | if (!$uid) { |
637 | + $uid = $this->getSession(self::SESSION_UID); | ||
638 | + if (!$uid) { | ||
639 | $result['code'] = 400; | 639 | $result['code'] = 400; |
640 | $result['message'] = '请先登录'; | 640 | $result['message'] = '请先登录'; |
641 | $result['data'] = Helpers::url('/signin.html', array('refer' => $this->server('HTTP_REFERER', '/')), 'default'); | 641 | $result['data'] = Helpers::url('/signin.html', array('refer' => $this->server('HTTP_REFERER', '/')), 'default'); |
-
Please register or login to post a comment