def verify_claim_token(user, token, pid):
 if (not user.verify_claim_token(token=token, project_id=pid)):
  if user.is_registered:
   error_data = {'message_short': 'User has already been claimed.', 'message_long': 'Please <a href="/login/">log in</a> to continue.'}
   raise HTTPError(400, data=error_data)
  else:
   return False
 return True

def verify_claim_token ( user , token , pid ) : if ( not user . verify_claim_token ( token = token , project_id = pid ) ) : if user . is_registered : error_data = { 'message_short' : 'User has already been claimed.' , 'message_long' : 'Please <a href="/login/">log in</a> to continue.' } raise HTTPError ( 400 , data = error_data ) else : return False return True
view helper that checks that a claim token for a given user and node id is valid .