From d054b8eb63678592e92050270ba5bbc281e85345 Mon Sep 17 00:00:00 2001 From: Lloyd Hilaiel <lloyd@hilaiel.com> Date: Fri, 6 Jan 2012 12:55:02 -0700 Subject: [PATCH] staging a new acct on a session logs you out. clear the auth'd bit on the session when this happens to prevent errors that occur when the loadgen client thinks it's authed, but the server knows its not. issue #785 --- lib/load_gen/activities/reset_pass.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/load_gen/activities/reset_pass.js b/lib/load_gen/activities/reset_pass.js index eb56281be..a60f5002e 100644 --- a/lib/load_gen/activities/reset_pass.js +++ b/lib/load_gen/activities/reset_pass.js @@ -75,6 +75,11 @@ exports.startFunc = function(cfg, cb) { var origin = userdb.any(user.sites); + // staging a user will log you out! let's clear the authenticated bit + if (context && context.session && context.session.authenticated) { + context.session.authenticated = false; + } + // stage them wcli.post(cfg, '/wsapi/stage_user', context, { email: email, -- GitLab