浏览代码

auth_db: more details for is_subscriber()

Daniel-Constantin Mierla 10 年之前
父节点
当前提交
7bf4c6d727
共有 2 个文件被更改,包括 9 次插入5 次删除
  1. 5 3
      modules/auth_db/README
  2. 4 2
      modules/auth_db/doc/auth_db_admin.xml

+ 5 - 3
modules/auth_db/README

@@ -463,15 +463,17 @@ if (!auth_check("$fd", "subscriber", "1")) {
        (usually subscriber table). The string may contain pseudo
        variables.
      * flags - set of flags to control the behaviour of the function. If
-       it is 1, then the function will use the domain part of the URI to
-       perform the database table search.
+       1st bit is set, then the function will use the domain part of the
+       URI to perform the database table search. If 2nd bit is set, then
+       the credentials are not loaded in variables (a simple check if
+       subscriber exists).
        The parameter may be a pseudo variable.
 
    This function can be used from ANY_ROUTE.
 
    Example 1.13. is_subscriber usage
 ...
-if (!is_subscriber("$ru", "subscriber", "1")) {
+if (!is_subscriber("$ru", "subscriber", "3")) {
     # callee is not a local subscriber
     ...
 }

+ 4 - 2
modules/auth_db/doc/auth_db_admin.xml

@@ -585,8 +585,10 @@ if (!auth_check("$fd", "subscriber", "1")) {
 		</listitem>
 		<listitem>
 			<para><emphasis>flags</emphasis> - set of flags to control the
-			behaviour of the function. If it is 1, then the function will
+			behaviour of the function. If 1st bit is set, then the function will
 			use the domain part of the URI to perform the database table search.
+			If 2nd bit is set, then the credentials are not loaded in variables
+			(a simple check if subscriber exists).
 			</para>
 			<para>
 			The parameter may be a pseudo variable.
@@ -600,7 +602,7 @@ if (!auth_check("$fd", "subscriber", "1")) {
 		<title>is_subscriber usage</title>
 		<programlisting format="linespecific">
 ...
-if (!is_subscriber("$ru", "subscriber", "1")) {
+if (!is_subscriber("$ru", "subscriber", "3")) {
     # callee is not a local subscriber
     ...
 }