plugins/mod_saslauth.lua
changeset 4505 b1e10c327d66
parent 4504 55b61221ecb8
child 4506 6643c9753453
--- a/plugins/mod_saslauth.lua	Sun Feb 12 15:05:31 2012 +0100
+++ b/plugins/mod_saslauth.lua	Sun Feb 12 15:08:12 2012 +0100
@@ -60,6 +60,7 @@
 			session:reset_stream();
 		else
 			module:log("warn", "SASL succeeded but username was invalid");
+			module:fire_event("authentication-failure", { session = session, condition = "not-authorized", text = err });
 			session.sasl_handler = session.sasl_handler:clean_clone();
 			return "failure", "not-authorized", "User authenticated successfully, but username was invalid";
 		end