@login_required
def associate_success(request, identity_url, openid_response, redirect_field_name=REDIRECT_FIELD_NAME, send_email=True, **kwargs):
 openid_ = from_openid_response(openid_response)
 openids = request.session.get('openids', [])
 openids.append(openid_)
 request.session['openids'] = openids
 uassoc = UserAssociation(openid_url=str(openid_), user_id=request.user.id)
 uassoc.save(send_email=send_email)
 redirect_to = request.GET.get(redirect_field_name, '')
 if ((not redirect_to) or ('//' in redirect_to) or (' ' in redirect_to)):
  redirect_to = settings.LOGIN_REDIRECT_URL
 return HttpResponseRedirect(redirect_to)

@ login_required def associate_success ( request , identity_url , openid_response , redirect_field_name = REDIRECT_FIELD_NAME , send_email = True , ** kwargs ) : openid_ = from_openid_response ( openid_response ) openids = request . session . get ( 'openids' , [ ] ) openids . append ( openid_ ) request . session [ 'openids' ] = openids uassoc = UserAssociation ( openid_url = str ( openid_ ) , user_id = request . user . id ) uassoc . save ( send_email = send_email ) redirect_to = request . GET . get ( redirect_field_name , '' ) if ( ( not redirect_to ) or ( '//' in redirect_to ) or ( ' ' in redirect_to ) ) : redirect_to = settings . LOGIN_REDIRECT_URL return HttpResponseRedirect ( redirect_to )
function used when new openid association success .