aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/docs/auth_api.html
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2010-11-20 17:00:05 +0100
committerNils Adermann <naderman@naderman.de>2010-11-20 17:00:05 +0100
commit7f21a5f46156660d7ea6a4bdb59166ac553e2be8 (patch)
tree3963b4075f58c43ffc01fe290b04a800668bc53c /phpBB/docs/auth_api.html
parentc4e02a191628b4b9f7b6340f2876607663baeb5a (diff)
parentaf4c2a3eb15fc4318b23dcb7794c230cf3ec2a0f (diff)
downloadforums-7f21a5f46156660d7ea6a4bdb59166ac553e2be8.tar
forums-7f21a5f46156660d7ea6a4bdb59166ac553e2be8.tar.gz
forums-7f21a5f46156660d7ea6a4bdb59166ac553e2be8.tar.bz2
forums-7f21a5f46156660d7ea6a4bdb59166ac553e2be8.tar.xz
forums-7f21a5f46156660d7ea6a4bdb59166ac553e2be8.zip
Merge commit 'release-3.0.8'
* commit 'release-3.0.8': (393 commits) [prep-release-3.0.8] Incrementing version number to 3.0.8 and update changelog [ticket/9903] Script for detecting potentially malicious flash bbcodes [ticket/9904] Update WebPI Parameters.xml to work with WebMatrix. [ticket/9899] Change recaptcha theme from default to 'clean' in the ACP. [ticket/9509] Fix a typo and wrong period placement [ticket/9903] Fix XSS in BBcode-parser's Flash-BBcode. [develop-olympus] Updating changelog for last minute 3.0.8-RC1 fixes. [ticket/9140] Check current board version in incremental update packages [ticket/9891] Updater drops language-selection after database-update [develop-olympus] Updating changelog with latest changes for 3.0.8-RC1 [ticket/9884] Reduce queue interval to 60 seconds, email package size to 20 [ticket/9886] Update fails on PostgreSQL because of an error in _add_module [ticket/9888] Update fails when Bing [Bot] was already added to the users table [develop-olympus] Bumping version number for 3.0.8-RC1. [ticket/9885] Fix extension group name updater. Loop through all languages. [ticket/9847] Fix typo in search synonyms. Use british english for 'judgement'. [ticket/9883] Change an American English spelling to British English. [task/phing-build] Correct the path for update package patch files. [ticket/9880] Change "antibot" to "anti-spambot". [ticket/9696] Surpress is_dir() notice when using SQLite with open_basedir. ...
Diffstat (limited to 'phpBB/docs/auth_api.html')
-rw-r--r--phpBB/docs/auth_api.html50
1 files changed, 48 insertions, 2 deletions
diff --git a/phpBB/docs/auth_api.html b/phpBB/docs/auth_api.html
index c83aaadc2d..8973582bdb 100644
--- a/phpBB/docs/auth_api.html
+++ b/phpBB/docs/auth_api.html
@@ -61,6 +61,9 @@
<li><a href="#acl_getf">acl_getf</a></li>
<li><a href="#acl_getf_global">acl_getf_global</a></li>
<li><a href="#acl_cache">acl_cache</a></li>
+ <li><a href="#acl_clear_prefetch">acl_clear_prefetch</a></li>
+ <li><a href="#acl_get_list">acl_get_list</a></li>
+ <li><a href="#misc">Miscellaneous</a></li>
</ol>
</li>
<li><a href="#admin_related">Admin related functions</a></li>
@@ -176,7 +179,7 @@ array(<em>forum_id1</em> =&gt; array(<em>option</em> =&gt; <em>integer</em>), <e
<p>This method is used to find out whether a user has a permission in at least one forum or globally. This method is similar to checking whether <code>acl_getf(option, true)</code> returned one or more forums but it's faster. It should be called in the following way:</p>
<div class="codebox"><pre>
-$result = acl_getf_global(<code>option</code>)
+$result = $auth-&gt;acl_getf_global(<code>option</code>)
</pre></div>
<p>As with the previous methods option is a string specifying the permission which has to be checked.</p>
@@ -187,6 +190,49 @@ $result = acl_getf_global(<code>option</code>)
<p>This should be considered a private method and not be called externally. It handles the generation of the user_permissions data from the basic user and group authorisation data. When necessary this method is called automatically by <code>acl</code>.</p>
+ <a name="acl_clear_prefetch"></a><h3>2.vii. acl_clear_prefetch</h3>
+
+ <p>This method clears the user_permissions column in the users table for the given user. If the user ID passed is zero, the permissions cache is cleared for all users. This method should be called whenever permissions are set.</p>
+
+ <div class="codebox"><pre>
+// clear stored permissions for user 2
+$user_id = 2;
+$auth->acl_clear_prefetch($user_id);
+</pre></div>
+
+ <p>This method returns void.</p>
+
+ <a name="acl_get_list"></a><h3>2.viii. acl_get_list</h3>
+
+ <p>This method returns an an array describing which users have permissions in given fora. The resultant array contains an entry for permission that every user has in every forum when no arguments are passed.</p>
+
+ <div class="codebox"><pre>
+$user_id = array(2, 53);
+$permissions = array('f_list', 'f_read');
+$forum_id = array(1, 2, 3);
+$result = $auth-&gt;acl_get_list($user_id, $permissions, $forum_id);
+</pre></div>
+
+ <p>The parameters may be of the following legal types:</p>
+ <ul>
+ <li><strong>$user_id</strong>: <code>false</code>, int, array(int, int, int, ...)</li>
+ <li><strong>$permissions</strong>: <code>false</code>, string, array(string, string, ...)</li>
+ <li><strong>$forum_id</strong>: <code>false</code>, int, array(int, int, int, ...)</li>
+ </ul>
+
+ <a name="misc"></a><h3>2.ix. Miscellaneous</h3>
+
+ <p>There are other methods defined in the auth class which serve mostly as private methods, but are available for use if needed. Each of them is used to pull data directly from the database tables. They are:</p>
+ <ul>
+ <li><pre>function acl_group_raw_data($group_id = false, $opts = false, $forum_id = false)</pre></li>
+ <li><pre>function acl_user_raw_data($user_id = false, $opts = false, $forum_id = false)</pre></li>
+ <li><pre>function acl_raw_data_single_user($user_id)</pre></li>
+ <li><pre>function acl_raw_data($user_id = false, $opts = false, $forum_id = false)</pre></li>
+ <li><pre>function acl_role_data($user_type, $role_type, $ug_id = false, $forum_id = false)</pre></li>
+ </ul>
+
+ <p>Of these, <code>acl_raw_data</code> is the most general, but the others will be faster if you need a smaller amount of data.</p>
+
</div>
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
@@ -241,7 +287,7 @@ $auth_admin = new auth_admin();
<!-- END DOCUMENT -->
<div id="page-footer">
- <div class="version"> $Id$ </div>
+ <div class="version">&nbsp;</div>
</div>
</div></div>