浏览代码

Added smtp_auth hook

pdontthink 18 年之前
父节点
当前提交
153c6aa3b2
共有 2 个文件被更改,包括 7 次插入0 次删除
  1. 1 0
      ChangeLog
  2. 6 0
      functions/auth.php

+ 1 - 0
ChangeLog

@@ -214,6 +214,7 @@ Version 1.5.2 - SVN
   - No longer store all message composition sessions in the PHP session,
   - No longer store all message composition sessions in the PHP session,
     since it was not made use of and in rare cases, made sessions too big
     since it was not made use of and in rare cases, made sessions too big
   - Composition restoration functionality now correctly restores attachments
   - Composition restoration functionality now correctly restores attachments
+  - Added smtp_auth hook
 
 
 Version 1.5.1 (branched on 2006-02-12)
 Version 1.5.1 (branched on 2006-02-12)
 --------------------------------------
 --------------------------------------

+ 6 - 0
functions/auth.php

@@ -277,4 +277,10 @@ function get_smtp_user(&$user, &$pass) {
         $user = $username;
         $user = $username;
         $pass = sqauth_read_password();
         $pass = sqauth_read_password();
     }
     }
+
+    // plugin authors note: override $user or $pass by
+    // directly changing the arguments array contents 
+    // in your plugin e.g., $args[0] = 'new_username';
+    //
+    do_hook('smtp_auth', $temp=array(&$user, &$pass));
 }
 }