152
152
# Check that the user's status is "no_agreement".
153
153
# (Both to avoid redundant calls, and to stop disabled users from
154
154
# re-enabling their accounts).
155
155
if user_details.state != "no_agreement":
156
156
req.throw_error(req.HTTP_BAD_REQUEST)
157
157
# Write state "pending" to ensure we don't try this again