Commit af69307e by aagusti

perbaikan oauth login

1 parent d58e4def
...@@ -150,7 +150,9 @@ def oauth2_login(request, params=None): ...@@ -150,7 +150,9 @@ def oauth2_login(request, params=None):
external.from_dict(values) external.from_dict(values)
DBSession.add(external) DBSession.add(external)
DBSession.flush() DBSession.flush()
if user and user.status != 1:
raise Oauth2UserExc(
"User anda masih menunggu verifikasi atau lagi di blokir")
# # todo: what is this???? # # todo: what is this????
# # values['access_token'] # # values['access_token']
# # values['alt_token'] # # values['alt_token']
...@@ -243,9 +245,6 @@ class ViewLogin(BaseView): ...@@ -243,9 +245,6 @@ class ViewLogin(BaseView):
return HTTPFound(location=request.route_url('login')) return HTTPFound(location=request.route_url('login'))
if user and user.status == 1: if user and user.status == 1:
return redirect_login(request, user) return redirect_login(request, user)
else:
message = "User anda masih menunggu verifikasi atau lagi di blokir"
request.session.flash(message, "error")
login = "" login = ""
if login_tpl == 'templates/login.pt': if login_tpl == 'templates/login.pt':
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!