# HG changeset patch # User Kim Alvefur # Date 1329055531 -3600 # Node ID 55b61221ecb8959e84e277230a77f6365d886ffd # Parent dd1eaecc11f95abf29ae18d70211c80932d38cee mod_saslauth: Move authentication-success event to after session has been made authenticated. diff -r dd1eaecc11f9 -r 55b61221ecb8 plugins/mod_saslauth.lua --- a/plugins/mod_saslauth.lua Sat Feb 11 14:51:00 2012 +0000 +++ b/plugins/mod_saslauth.lua Sun Feb 12 15:05:31 2012 +0100 @@ -51,11 +51,11 @@ module:fire_event("authentication-failure", { session = session, condition = ret, text = err_msg }); session.sasl_handler = session.sasl_handler:clean_clone(); elseif status == "success" then - module:fire_event("authentication-success", { session = session }); local username = nodeprep(session.sasl_handler.username); local ok, err = sm_make_authenticated(session, session.sasl_handler.username); if ok then + module:fire_event("authentication-success", { session = session }); session.sasl_handler = nil; session:reset_stream(); else