aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2012-02-12 15:05:31 +0100
committerKim Alvefur <zash@zash.se>2012-02-12 15:05:31 +0100
commit6eaa0d2b866fdae600d37dd3c9f609546cd98d2a (patch)
treed80930ce9553cd92c8868e06db60e81eaaa59e8c
parentfa30c62a6abcead910e0ea85529a0225d7a16e41 (diff)
downloadprosody-6eaa0d2b866fdae600d37dd3c9f609546cd98d2a.tar.gz
prosody-6eaa0d2b866fdae600d37dd3c9f609546cd98d2a.zip
mod_saslauth: Move authentication-success event to after session has been made authenticated.
-rw-r--r--plugins/mod_saslauth.lua2
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