LDAPAccountManager/lam-web/developers/phpdoc/lib/_lib---account.inc.html

589 lines
19 KiB
HTML
Raw Normal View History

2007-11-04 11:19:11 +00:00
<html>
<head>
<title>Docs for page account.inc</title>
<link rel="stylesheet" type="text/css" href="../media/style.css">
</head>
<body>
<table border="0" cellspacing="0" cellpadding="0" height="48" width="100%">
<tr>
<td class="header_top">lib</td>
</tr>
<tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt="" /></td></tr>
<tr>
<td class="header_menu">
[ <a href="../classtrees_lib.html" class="menu">class tree: lib</a> ]
[ <a href="../elementindex_lib.html" class="menu">index: lib</a> ]
[ <a href="../elementindex.html" class="menu">all elements</a> ]
</td>
</tr>
<tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt="" /></td></tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="200" class="menu">
<div id="ric">
<p><a href="../ric_README.html">README</a></p>
2008-01-06 18:15:35 +00:00
<p><a href="../ric_INSTALL.html">INSTALL</a></p>
2007-11-04 11:19:11 +00:00
</div>
<b>Packages:</b><br />
<a href="../li_configuration.html">configuration</a><br />
<a href="../li_Help.html">Help</a><br />
<a href="../li_LDAP.html">LDAP</a><br />
<a href="../li_lib.html">lib</a><br />
<a href="../li_lists.html">lists</a><br />
<a href="../li_main.html">main</a><br />
<a href="../li_modules.html">modules</a><br />
<a href="../li_PDF.html">PDF</a><br />
<a href="../li_profiles.html">profiles</a><br />
<a href="../li_selfService.html">selfService</a><br />
<a href="../li_tests.html">tests</a><br />
<a href="../li_tools.html">tools</a><br />
<a href="../li_types.html">types</a><br />
<br /><br />
<b>Files:</b><br />
<div class="package">
<a href="../lib/_lib---account.inc.html"> account.inc
</a><br>
<a href="../lib/_lib---cache.inc.html"> cache.inc
</a><br>
<a href="../lib/_lib---schema.inc.html"> schema.inc
</a><br>
<a href="../lib/_lib---security.inc.html"> security.inc
</a><br>
<a href="../lib/_lib---status.inc.html"> status.inc
</a><br>
</div><br />
<b>Classes:</b><br />
<div class="package">
<a href="../lib/AttributeType.html">AttributeType</a><br />
<a href="../lib/cache.html">cache</a><br />
<a href="../lib/MatchingRule.html">MatchingRule</a><br />
<a href="../lib/MatchingRuleUse.html">MatchingRuleUse</a><br />
<a href="../lib/ObjectClass.html">ObjectClass</a><br />
<a href="../lib/ObjectClassAttribute.html">ObjectClassAttribute</a><br />
<a href="../lib/SchemaItem.html">SchemaItem</a><br />
<a href="../lib/Syntax.html">Syntax</a><br />
</div>
</td>
<td>
<table cellpadding="10" cellspacing="0" width="100%" border="0"><tr><td valign="top">
<h1>Procedural File: account.inc</h1>
Source Location: /lib/account.inc<br /><br />
<br>
<br>
<div class="contents">
<h2>Classes:</h2>
<dt><a href="../modules/samba3domain.html">samba3domain</a></dt>
<dd>Represents a Samba 3 domain entry</dd>
</div><br /><br />
<h2>Page Details:</h2>
This provides several helper function for the account modules.<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b>author:</b>&nbsp;&nbsp;</td><td>Tilo Lutz</td>
</tr>
<tr>
<td><b>author:</b>&nbsp;&nbsp;</td><td>Roland Gruber</td>
</tr>
</table>
</div>
<br /><br />
<br /><br />
<br /><br />
<br />
<hr />
<a name="functionarray_delete"></a>
2008-01-06 18:15:35 +00:00
<h3>array_delete <span class="smalllinenumber">[line 69]</span></h3>
2007-11-04 11:19:11 +00:00
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>array array_delete(
array $values, array $array)</code>
</td></tr></table>
</td></tr></table><br />
This function will return all values from $array without values of $values.<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b>return:</b>&nbsp;&nbsp;</td><td>list of remaining values</td>
</tr>
</table>
</div>
<br /><br />
<h4>Parameters</h4>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="type">array&nbsp;&nbsp;</td>
<td><b>$values</b>&nbsp;&nbsp;</td>
<td>list of values which should be removed</td>
</tr>
<tr>
<td class="type">array&nbsp;&nbsp;</td>
<td><b>$array</b>&nbsp;&nbsp;</td>
<td>list of original values</td>
</tr>
</table>
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
</div>
<hr />
2008-01-06 18:15:35 +00:00
<a name="functioncmp_domain"></a>
<h3>cmp_domain <span class="smalllinenumber">[line 342]</span></h3>
2007-11-04 11:19:11 +00:00
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
2008-01-06 18:15:35 +00:00
<code>integer cmp_domain(
string $a, string $b)</code>
2007-11-04 11:19:11 +00:00
</td></tr></table>
</td></tr></table><br />
2008-01-06 18:15:35 +00:00
Helper function to sort the domains<br /><br /><br /><br />
2007-11-04 11:19:11 +00:00
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
2008-01-06 18:15:35 +00:00
<td><b>return:</b>&nbsp;&nbsp;</td><td>0 if equal, 1 if $a is greater, -1 if $b is greater</td>
2007-11-04 11:19:11 +00:00
</tr>
</table>
</div>
<br /><br />
<h4>Parameters</h4>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
2008-01-06 18:15:35 +00:00
<td class="type">string&nbsp;&nbsp;</td>
<td><b>$a</b>&nbsp;&nbsp;</td>
<td>first argument to compare</td>
2007-11-04 11:19:11 +00:00
</tr>
<tr>
2008-01-06 18:15:35 +00:00
<td class="type">string&nbsp;&nbsp;</td>
<td><b>$b</b>&nbsp;&nbsp;</td>
<td>second argument to compare</td>
2007-11-04 11:19:11 +00:00
</tr>
</table>
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
</div>
<hr />
2008-01-06 18:15:35 +00:00
<a name="functiongenerateRandomPassword"></a>
<h3>generateRandomPassword <span class="smalllinenumber">[line 293]</span></h3>
2007-11-04 11:19:11 +00:00
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
2008-01-06 18:15:35 +00:00
<code>String generateRandomPassword(
)</code>
2007-11-04 11:19:11 +00:00
</td></tr></table>
</td></tr></table><br />
2008-01-06 18:15:35 +00:00
Generates a random password with 12 digits.<br /><br /><br /><br />
2007-11-04 11:19:11 +00:00
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
2008-01-06 18:15:35 +00:00
<td><b>return:</b>&nbsp;&nbsp;</td><td>password</td>
2007-11-04 11:19:11 +00:00
</tr>
</table>
</div>
<br /><br />
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
</div>
<hr />
<a name="functiongetdays"></a>
2008-01-06 18:15:35 +00:00
<h3>getdays <span class="smalllinenumber">[line 102]</span></h3>
2007-11-04 11:19:11 +00:00
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>number getdays(
)</code>
</td></tr></table>
</td></tr></table><br />
This function will return the days from 1.1.1970 until now.<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b>return:</b>&nbsp;&nbsp;</td><td>of days</td>
</tr>
</table>
</div>
<br /><br />
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
</div>
<hr />
<a name="functiongetshells"></a>
2008-01-06 18:15:35 +00:00
<h3>getshells <span class="smalllinenumber">[line 40]</span></h3>
2007-11-04 11:19:11 +00:00
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>array getshells(
)</code>
</td></tr></table>
</td></tr></table><br />
Returns a list of shells listed in config/shells.<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b>return:</b>&nbsp;&nbsp;</td><td>list of shell names</td>
</tr>
</table>
</div>
<br /><br />
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
</div>
<hr />
<a name="functionget_preg"></a>
2008-01-06 18:15:35 +00:00
<h3>get_preg <span class="smalllinenumber">[line 385]</span></h3>
2007-11-04 11:19:11 +00:00
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>boolean get_preg(
string $argument, string $regexp)</code>
</td></tr></table>
</td></tr></table><br />
Checks if a given value matches the selected regular expression.<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b>return:</b>&nbsp;&nbsp;</td><td>true if matches, otherwise false</td>
</tr>
</table>
</div>
<br /><br />
<h4>Parameters</h4>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="type">string&nbsp;&nbsp;</td>
<td><b>$argument</b>&nbsp;&nbsp;</td>
<td>value to check</td>
</tr>
<tr>
<td class="type">string&nbsp;&nbsp;</td>
<td><b>$regexp</b>&nbsp;&nbsp;</td>
<td>pattern name</td>
</tr>
</table>
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
</div>
<hr />
<a name="functionin_array_ignore_case"></a>
2008-01-06 18:15:35 +00:00
<h3>in_array_ignore_case <span class="smalllinenumber">[line 85]</span></h3>
2007-11-04 11:19:11 +00:00
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>void in_array_ignore_case(
$needle, $haystack)</code>
</td></tr></table>
</td></tr></table><br />
Checks if a string exists in an array, ignoring case.<br /><br /> <br /><br />
<h4>Parameters</h4>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="type">&nbsp;&nbsp;</td>
<td><b>$needle</b>&nbsp;&nbsp;</td>
<td></td>
</tr>
<tr>
<td class="type">&nbsp;&nbsp;</td>
<td><b>$haystack</b>&nbsp;&nbsp;</td>
<td></td>
</tr>
</table>
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
</div>
<hr />
<a name="functionlmPassword"></a>
2008-01-06 18:15:35 +00:00
<h3>lmPassword <span class="smalllinenumber">[line 137]</span></h3>
2007-11-04 11:19:11 +00:00
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>string lmPassword(
string $password)</code>
</td></tr></table>
</td></tr></table><br />
Generates the LM hash of a password.<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b>return:</b>&nbsp;&nbsp;</td><td>password hash</td>
</tr>
</table>
</div>
<br /><br />
<h4>Parameters</h4>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="type">string&nbsp;&nbsp;</td>
<td><b>$password</b>&nbsp;&nbsp;</td>
<td>password original password</td>
</tr>
</table>
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
</div>
<hr />
<a name="functionntPassword"></a>
2008-01-06 18:15:35 +00:00
<h3>ntPassword <span class="smalllinenumber">[line 151]</span></h3>
2007-11-04 11:19:11 +00:00
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>string ntPassword(
string $password)</code>
</td></tr></table>
</td></tr></table><br />
Generates the NT hash of a password.<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b>return:</b>&nbsp;&nbsp;</td><td>password hash</td>
</tr>
</table>
</div>
<br /><br />
<h4>Parameters</h4>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="type">string&nbsp;&nbsp;</td>
<td><b>$password</b>&nbsp;&nbsp;</td>
<td>password original password</td>
</tr>
</table>
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
</div>
<hr />
<a name="functionpwd_disable"></a>
2008-01-06 18:15:35 +00:00
<h3>pwd_disable <span class="smalllinenumber">[line 251]</span></h3>
2007-11-04 11:19:11 +00:00
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>string pwd_disable(
string $hash)</code>
</td></tr></table>
</td></tr></table><br />
Marks an password hash as disabled and returns the new hash string<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b>return:</b>&nbsp;&nbsp;</td><td>disabled hash value</td>
</tr>
</table>
</div>
<br /><br />
<h4>Parameters</h4>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="type">string&nbsp;&nbsp;</td>
<td><b>$hash</b>&nbsp;&nbsp;</td>
<td>hash value to disable</td>
</tr>
</table>
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
</div>
<hr />
<a name="functionpwd_enable"></a>
2008-01-06 18:15:35 +00:00
<h3>pwd_enable <span class="smalllinenumber">[line 226]</span></h3>
2007-11-04 11:19:11 +00:00
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>string pwd_enable(
string $hash)</code>
</td></tr></table>
</td></tr></table><br />
Marks an password hash as enabled and returns the new hash string<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b>return:</b>&nbsp;&nbsp;</td><td>enabled password hash</td>
</tr>
</table>
</div>
<br /><br />
<h4>Parameters</h4>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="type">string&nbsp;&nbsp;</td>
<td><b>$hash</b>&nbsp;&nbsp;</td>
<td>hash value to enable</td>
</tr>
</table>
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
</div>
<hr />
<a name="functionpwd_hash"></a>
2008-01-06 18:15:35 +00:00
<h3>pwd_hash <span class="smalllinenumber">[line 171]</span></h3>
2007-11-04 11:19:11 +00:00
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>string pwd_hash(
string $password, [boolean $enabled = true], [string $hashType = &#039;SSHA&#039;])</code>
</td></tr></table>
</td></tr></table><br />
Returns the hash value of a plain text password the hash algorithm depends on the configuration file<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b>return:</b>&nbsp;&nbsp;</td><td>the password hash</td>
</tr>
</table>
</div>
<br /><br />
<h4>Parameters</h4>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="type">string&nbsp;&nbsp;</td>
<td><b>$password</b>&nbsp;&nbsp;</td>
<td>the password string</td>
</tr>
<tr>
<td class="type">boolean&nbsp;&nbsp;</td>
<td><b>$enabled</b>&nbsp;&nbsp;</td>
<td>marks the hash as enabled/disabled (e.g. by prefixing &quot;!&quot;)</td>
</tr>
<tr>
<td class="type">string&nbsp;&nbsp;</td>
<td><b>$hashType</b>&nbsp;&nbsp;</td>
<td>password hash type (CRYPT, SHA, SSHA, MD5, SMD5, PLAIN)</td>
</tr>
</table>
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
</div>
<hr />
<a name="functionpwd_is_enabled"></a>
2008-01-06 18:15:35 +00:00
<h3>pwd_is_enabled <span class="smalllinenumber">[line 276]</span></h3>
2007-11-04 11:19:11 +00:00
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>boolean pwd_is_enabled(
string $hash)</code>
</td></tr></table>
</td></tr></table><br />
Checks if a password hash is enabled/disabled<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b>return:</b>&nbsp;&nbsp;</td><td>true if the password is marked as enabled</td>
</tr>
</table>
</div>
<br /><br />
<h4>Parameters</h4>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="type">string&nbsp;&nbsp;</td>
<td><b>$hash</b>&nbsp;&nbsp;</td>
<td>password hash to check</td>
</tr>
</table>
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
</div>
<hr />
<a name="functionsearch_domains"></a>
2008-01-06 18:15:35 +00:00
<h3>search_domains <span class="smalllinenumber">[line 308]</span></h3>
2007-11-04 11:19:11 +00:00
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>array search_domains(
)</code>
</td></tr></table>
</td></tr></table><br />
Returns an array with all Samba 3 domain entries under the given suffix<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b>return:</b>&nbsp;&nbsp;</td><td>list of samba3domain objects</td>
</tr>
</table>
</div>
<br /><br />
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
</div>
<hr />
<a name="functionsmbflag"></a>
2008-01-06 18:15:35 +00:00
<h3>smbflag <span class="smalllinenumber">[line 114]</span></h3>
2007-11-04 11:19:11 +00:00
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>string smbflag(
array $input)</code>
</td></tr></table>
</td></tr></table><br />
Takes a list of Samba flags and creates the corresponding flag string.<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b>return:</b>&nbsp;&nbsp;</td><td>Samba flag string</td>
</tr>
</table>
</div>
<br /><br />
<h4>Parameters</h4>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="type">array&nbsp;&nbsp;</td>
<td><b>$input</b>&nbsp;&nbsp;</td>
<td>is an array of Samba flags (e.g. X or D)</td>
</tr>
</table>
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
</div>
<div class="credit">
<hr />
2008-01-06 18:15:35 +00:00
Documentation generated on Sun, 06 Jan 2008 18:58:49 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.0</a>
2007-11-04 11:19:11 +00:00
</div>
</td></tr></table>
</td>
</tr>
</table>
</body>
</html>