diff options
author | Kim Alvefur <zash@zash.se> | 2012-02-12 15:05:31 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2012-02-12 15:05:31 +0100 |
commit | f672faa0165f7288cb5e1dc71c76430f1c15b110 (patch) | |
tree | d80930ce9553cd92c8868e06db60e81eaaa59e8c /plugins/mod_saslauth.lua | |
parent | c256444e8b4181648a938c24270feaade73d9b5a (diff) | |
download | prosody-f672faa0165f7288cb5e1dc71c76430f1c15b110.tar.gz prosody-f672faa0165f7288cb5e1dc71c76430f1c15b110.zip |
mod_saslauth: Move authentication-success event to after session has been made authenticated.
Diffstat (limited to 'plugins/mod_saslauth.lua')
-rw-r--r-- | plugins/mod_saslauth.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_saslauth.lua b/plugins/mod_saslauth.lua index 58655a24..49987f84 100644 --- a/plugins/mod_saslauth.lua +++ b/plugins/mod_saslauth.lua @@ -51,11 +51,11 @@ local function handle_status(session, status, ret, err_msg) 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 |