MCPcopy Create free account
hub / github.com/ddserver/ddserver / post_lostpass_cancel

Function post_lostpass_cancel

ddserver/interface/pages/lostpasswd.py:114–126  ·  view source on GitHub ↗
(user,
                         db,
                         messages)

Source from the content-addressed store, hash-verified

112@require(db = 'ddserver.db:Database',
113 messages = 'ddserver.interface.message:MessageManager')
114def post_lostpass_cancel(user,
115 db,
116 messages):
117 with db.cursor() as cur:
118 cur.execute('''
119 UPDATE `users`
120 SET `authcode` = NULL
121 WHERE `id` = %(user_id)s
122 ''', {'user_id': user.id})
123
124 messages.success('Your password reset request has been cancelled.')
125
126 bottle.redirect('/')

Callers

nothing calls this directly

Calls 2

cursorMethod · 0.80
successMethod · 0.80

Tested by

no test coverage detected