diff options
Diffstat (limited to 'phpBB/docs/auth_api.html')
-rw-r--r-- | phpBB/docs/auth_api.html | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/phpBB/docs/auth_api.html b/phpBB/docs/auth_api.html index c68ae7821f..27d090c296 100644 --- a/phpBB/docs/auth_api.html +++ b/phpBB/docs/auth_api.html @@ -6,7 +6,7 @@ <meta name="description" content="This is an explanation of how to use the phpBB auth/acl API" /> <title>phpBB3 • Auth API</title> -<link href="stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" /> +<link href="assets/css/stylesheet.css" rel="stylesheet" type="text/css" media="screen" /> </head> @@ -16,16 +16,16 @@ <a id="top" name="top" accesskey="t"></a> <div id="page-header"> <div class="headerbar"> - <div class="inner"><span class="corners-top"><span></span></span> + <div class="inner"> <div id="doc-description"> - <a href="../index.php" id="logo"><img src="site_logo.gif" alt="" /></a> + <a href="../index.php" id="logo"><img src="assets/images/site_logo.gif" alt="" /></a> <h1>Auth API</h1> <p>This is an explanation of how to use the phpBB auth/acl API</p> <p style="display: none;"><a href="#start_here">Skip</a></p> </div> - <span class="corners-bottom"><span></span></span></div> + </div> </div> </div> @@ -35,12 +35,12 @@ <!-- BEGIN DOCUMENT --> - <p>This is an explanation of how to use the phpBB auth/acl API.</p> + <p class="paragraph main-description">This is an explanation of how to use the phpBB auth/acl API.</p> <h1>Auth API</h1> <div class="paragraph menu"> - <div class="inner"><span class="corners-top"><span></span></span> + <div class="inner"> <div class="content"> @@ -65,7 +65,7 @@ </div> - <span class="corners-bottom"><span></span></span></div> + </div> </div> <hr /> @@ -73,7 +73,7 @@ <a name="intro"></a><h2>1. Introduction</h2> <div class="paragraph"> - <div class="inner"><span class="corners-top"><span></span></span> + <div class="inner"> <div class="content"> @@ -86,8 +86,8 @@ <p>To use any methods contained with the <code>auth</code> class it first needs to be instantiated. This is best achieved early in the execution of the script in the following manner:</p> <div class="codebox"><pre> -$auth = new phpbb\auth\auth(); - </pre></div> +$auth = new phpbb\auth\auth();</pre> + </div> <p>Once an instance of the class has been created you are free to call the various methods it contains. Please note that should you wish to use the <code>auth_admin</code> methods you will need to instantiate this separately but in the same way.</p> @@ -95,7 +95,7 @@ $auth = new phpbb\auth\auth(); <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div> - <span class="corners-bottom"><span></span></span></div> + </div> </div> <hr /> @@ -103,19 +103,19 @@ $auth = new phpbb\auth\auth(); <a name="methods"></a><h2>2. Methods</h2> <div class="paragraph"> - <div class="inner"><span class="corners-top"><span></span></span> + <div class="inner"> <div class="content"> <p>Following are the methods you are able to use.</p> <a name="acl"></a><h3>2.i. acl</h3> - + <p>The <code>acl</code> method is the initialisation routine for all the acl functions. If you intend calling any acl method you must first call this. The method takes as its one and only required parameter an associative array containing user information as stored in the database. This array must contain at least the following information; user_id, user_permissions and user_type. It is called in the following way:</p> <div class="codebox"><pre> -$auth->acl(<code>userdata</code>); - </pre></div> +$auth->acl(<code>userdata</code>);</pre> + </div> <p>Where userdata is the array containing the aforementioned data.</p> @@ -124,8 +124,8 @@ $auth->acl(<code>userdata</code>); <p>This method is the primary way of determining what a user can and cannot do for a given option globally or in a given forum. The method should be called in the following way:</p> <div class="codebox"><pre> -$result = $auth->acl_get(<code>option</code>[, <code>forum</code>]); - </pre></div> +$result = $auth->acl_get(<code>option</code>[, <code>forum</code>]);</pre> + </div> <p>Where option is a string representing the required option, e.g. 'f_list', 'm_edit', 'a_adduser', etc. By adding a ! in front of the option, e.g. '!f_list' the result of this method will be negated. The optional forum term is the integer forum_id.</p> @@ -142,8 +142,8 @@ $result = $auth->acl_get(<code>option</code>[, <code>forum</code>]); <p>The method should be called thus:</p> <div class="codebox"><pre> -$result = $auth->acl_gets(<code>option1</code>[, <code>option2</code>, ..., <code>optionN</code>, <code>forum</code>]); - </pre></div> +$result = $auth->acl_gets(<code>option1</code>[, <code>option2</code>, ..., <code>optionN</code>, <code>forum</code>]);</pre> + </div> <p>As with the <code>acl_get</code> method the options are strings representing the required permissions to check. The forum again is an integer representing a given forum_id.</p> @@ -154,16 +154,16 @@ $result = $auth->acl_gets(<code>option1</code>[, <code>option2</code>, ..., < <p>This method is used to find out in which forums a user is allowed to carry out an operation or to find out in which forums he is not allowed to carry out an operation. The method should be called in the following way:</p> <div class="codebox"><pre> -$result = $auth->acl_getf(<code>option</code>[, <code>clean</code>]); - </pre></div> +$result = $auth->acl_getf(<code>option</code>[, <code>clean</code>]);</pre> + </div> <p>Just like in the <code>acl_get</code> method the option is a string specifying the permission which has to be checked (negation using ! is allowed). The second parameter is a boolean. If it is set to false this method returns all forums with either zero or a positive integer. If it is set to true only those forums with a positive integer as the result will be returned.</p> <p>The method returns an associative array of the form:</p> <div class="codebox"><pre> -array(<em>forum_id1</em> => array(<em>option</em> => <em>integer</em>), <em>forum_id2</em> => ...) - </pre></div> +array(<em>forum_id1</em> => array(<em>option</em> => <em>integer</em>), <em>forum_id2</em> => ...)</pre> + </div> <p>Where option is the option passed to the method and integer is either zero or a positive integer and the same <code>acl_get(option, forum_id)</code> would return.</p> @@ -172,8 +172,8 @@ array(<em>forum_id1</em> => array(<em>option</em> => <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 = $auth->acl_getf_global(<code>option</code>) - </pre></div> +$result = $auth->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> @@ -230,7 +230,7 @@ $result = $auth->acl_get_list($user_id, $permissions, $forum_id); <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div> - <span class="corners-bottom"><span></span></span></div> + </div> </div> <hr /> @@ -238,7 +238,7 @@ $result = $auth->acl_get_list($user_id, $permissions, $forum_id); <a name="admin_related"></a><h2>3. Admin related functions</h2> <div class="paragraph"> - <div class="inner"><span class="corners-top"><span></span></span> + <div class="inner"> <div class="content"> @@ -247,8 +247,8 @@ $result = $auth->acl_get_list($user_id, $permissions, $forum_id); <p>To use any methods this class contains it first needs to be instantiated separately from <code>auth</code>. This is achieved in the same way as <code>auth</code>:</p> <div class="codebox"><pre> -$auth_admin = new auth_admin(); - </pre></div> +$auth_admin = new auth_admin();</pre> + </div> <p>This instance gives you access to both the methods of this specific class and that of <code>auth</code>.</p> @@ -256,7 +256,7 @@ $auth_admin = new auth_admin(); <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div> - <span class="corners-bottom"><span></span></span></div> + </div> </div> <hr /> @@ -264,17 +264,17 @@ $auth_admin = new auth_admin(); <a name="disclaimer"></a><h2>4. Copyright and disclaimer</h2> <div class="paragraph"> - <div class="inner"><span class="corners-top"><span></span></span> + <div class="inner"> <div class="content"> - <p>This application is opensource software released under the <a href="http://opensource.org/licenses/gpl-2.0.php">GNU General Public License v2</a>. Please see source code and the docs directory for more details. This package and its contents are Copyright (c) <a href="https://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p> + <p>phpBB is free software, released under the terms of the <a href="http://opensource.org/licenses/gpl-2.0.php">GNU General Public License, version 2 (GPL-2.0)</a>. Copyright © <a href="https://www.phpbb.com">phpBB Limited</a>. For full copyright and license information, please see the docs/CREDITS.txt file.</p> </div> <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div> - <span class="corners-bottom"><span></span></span></div> + </div> </div> <!-- END DOCUMENT --> @@ -285,7 +285,7 @@ $auth_admin = new auth_admin(); </div></div> <div> - <a id="bottom" name="bottom" accesskey="z"></a> + <a id="bottom" accesskey="z"></a> </div> </body> |