khanat-opennel-code/code/ryzom/tools/server/ryzom_ams_docs/html/classUsers.html
2013-09-15 18:27:07 +02:00

641 lines
31 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Ryzom Account Management System: Users Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
</head>
<body>
<div id="top"><!-- do not remove this div! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="logo.png"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">Ryzom Account Management System
&#160;<span id="projectnumber">1.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- Generated by Doxygen 1.7.6.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
<li class="current"><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
<li><a href="classes.html"><span>Data&#160;Structure&#160;Index</span></a></li>
<li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Data&#160;Fields</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pri-methods">Private Member Functions</a> </div>
<div class="headertitle">
<div class="title">Users Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<!-- doxytag: class="Users" -->
<p>handles basic user registration &amp; management functions (shard related).
<a href="classUsers.html#details">More...</a></p>
<div class="dynheader">
Inheritance diagram for Users:</div>
<div class="dyncontent">
<div class="center">
<img src="classUsers.png" usemap="#Users_map" alt=""/>
<map id="Users_map" name="Users_map">
<area href="classWebUsers.html" title="handles CMS/WWW related functions regarding user management &amp; registration." alt="WebUsers" shape="rect" coords="0,56,69,80"/>
<area href="classWebUsers.html" title="handles CMS/WWW related functions regarding user management &amp; registration." alt="WebUsers" shape="rect" coords="79,56,148,80"/>
</map>
</div></div>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classUsers.html#a740de04dc3aa7cf3bed959540ffab8f8">check_Register</a> ($values)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">checks if entered values before registering are valid. <a href="#a740de04dc3aa7cf3bed959540ffab8f8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classUsers.html#adfffce17947a9f72d68838db250c9ab8">checkUser</a> ($username)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">checks if entered username is valid. <a href="#adfffce17947a9f72d68838db250c9ab8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classUsers.html#a4cb5e34b56fb6de0ec318fb59e90838f">checkPassword</a> ($pass)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">checks if the password is valid. <a href="#a4cb5e34b56fb6de0ec318fb59e90838f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classUsers.html#a76646237ab053cdde386c06aa5437d8a">checkEmail</a> ($email)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">wrapper to check if the email address is valid. <a href="#a76646237ab053cdde386c06aa5437d8a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classUsers.html#a73637e760498c5cea55074896ec982ac">validEmail</a> ($email)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">check if the emailaddress structure is valid. <a href="#a73637e760498c5cea55074896ec982ac"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classUsers.html#a9c78408d50465957eeb8068810315a8e">check_change_password</a> ($values)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">check if the changing of a password is valid. <a href="#a9c78408d50465957eeb8068810315a8e"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classUsers.html#afb7603ac9556c1069fbf1c0062251203">generateSALT</a> ($length=2)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">generate a SALT. <a href="#afb7603ac9556c1069fbf1c0062251203"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classUsers.html#ac93aebf1960fb12975b120a2c394a8af">createUser</a> ($values, $user_id)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">creates a user in the shard. <a href="#ac93aebf1960fb12975b120a2c394a8af"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classUsers.html#aeac9f32fd53c97c92e5c774e154399df">createPermissions</a> ($pvalues)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">creates permissions in the shard db for a user. <a href="#aeac9f32fd53c97c92e5c774e154399df"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classUsers.html#ac3a8cb9a038f6aef0bd98be091274122">checkUserNameExists</a> ($username)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">check if username already exists. <a href="#ac3a8cb9a038f6aef0bd98be091274122"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classUsers.html#a37275e677004927b6b1a30e16c5b5b38">checkEmailExists</a> ($email)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">check if email already exists. <a href="#a37275e677004927b6b1a30e16c5b5b38"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classUsers.html#af0b98012abb190cf4617999f008de27e">checkLoginMatch</a> ($user, $pass)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">check if username and password matches. <a href="#af0b98012abb190cf4617999f008de27e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classUsers.html#ab89812058b0a71baf492af4652d67501">setAmsPassword</a> ($user, $pass)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">sets the shards password. <a href="#ab89812058b0a71baf492af4652d67501"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classUsers.html#ad1cbb1fe6ee72f46dc385bec6e274363">setAmsEmail</a> ($user, $mail)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">sets the shards email. <a href="#ad1cbb1fe6ee72f46dc385bec6e274363"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pri-methods"></a>
Private Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classUsers.html#a2f5349025bed3874f08d80652cab2fe0">confirmPassword</a> ($pass_result, $pass, $confirmpass)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">checks if the confirmPassword matches the original. <a href="#a2f5349025bed3874f08d80652cab2fe0"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>handles basic user registration &amp; management functions (shard related). </p>
<p>The <a class="el" href="classUsers.html" title="handles basic user registration &amp; management functions (shard related).">Users</a> class is the basis class of <a class="el" href="classWebUsers.html" title="handles CMS/WWW related functions regarding user management &amp; registration.">WebUsers</a>, this class provides functions being used by all CMS's and our own www version. The <a class="el" href="classWebUsers.html" title="handles CMS/WWW related functions regarding user management &amp; registration.">WebUsers</a> class however needs to be reimplemented by using the CMS's it's funcionality. This class handles the writing to the shard db mainly, and in case it's offline: writing to the ams_querycache. </p>
<dl class="author"><dt><b>Author:</b></dt><dd>Daan Janssens, mentored by Matthew Lagoe </dd></dl>
</div><hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a9c78408d50465957eeb8068810315a8e"></a><!-- doxytag: member="Users::check_change_password" ref="a9c78408d50465957eeb8068810315a8e" args="($values)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classUsers.html#a9c78408d50465957eeb8068810315a8e">check_change_password</a> </td>
<td>(</td>
<td class="paramtype">$&#160;</td>
<td class="paramname"><em>values</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>check if the changing of a password is valid. </p>
<p>a mod/admin doesn't has to fill in the previous password when he wants to change the password, however for changing his own password he has to fill it in. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">$values</td><td>an array containing the CurrentPass, ConfirmNewPass, NewPass and adminChangesOthers </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>if it is valid "success will be returned, else an array with errors will be returned. </dd></dl>
</div>
</div>
<a class="anchor" id="a740de04dc3aa7cf3bed959540ffab8f8"></a><!-- doxytag: member="Users::check_Register" ref="a740de04dc3aa7cf3bed959540ffab8f8" args="($values)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classUsers.html#a740de04dc3aa7cf3bed959540ffab8f8">check_Register</a> </td>
<td>(</td>
<td class="paramtype">$&#160;</td>
<td class="paramname"><em>values</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>checks if entered values before registering are valid. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">$values</td><td>array with Username,Password, ConfirmPass and Email. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>string Info: Returns a string, if input data is valid then "success" is returned, else an array with errors </dd></dl>
</div>
</div>
<a class="anchor" id="a76646237ab053cdde386c06aa5437d8a"></a><!-- doxytag: member="Users::checkEmail" ref="a76646237ab053cdde386c06aa5437d8a" args="($email)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classUsers.html#a76646237ab053cdde386c06aa5437d8a">checkEmail</a> </td>
<td>(</td>
<td class="paramtype">$&#160;</td>
<td class="paramname"><em>email</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>wrapper to check if the email address is valid. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">$email</td><td>the email address </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>"success", else in case it isn't valid an error will be returned. </dd></dl>
</div>
</div>
<a class="anchor" id="a37275e677004927b6b1a30e16c5b5b38"></a><!-- doxytag: member="Users::checkEmailExists" ref="a37275e677004927b6b1a30e16c5b5b38" args="($email)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classUsers.html#a37275e677004927b6b1a30e16c5b5b38">checkEmailExists</a> </td>
<td>(</td>
<td class="paramtype">$&#160;</td>
<td class="paramname"><em>email</em></td><td>)</td>
<td><code> [protected]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>check if email already exists. </p>
<p>This is the base function, it should be overwritten by the <a class="el" href="classWebUsers.html" title="handles CMS/WWW related functions regarding user management &amp; registration.">WebUsers</a> class. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">$email</td><td>the email address </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>string Info: Returns true or false if the email is in the www db. </dd></dl>
<p>Reimplemented in <a class="el" href="classWebUsers.html#a37275e677004927b6b1a30e16c5b5b38">WebUsers</a>, and <a class="el" href="classWebUsers.html#a37275e677004927b6b1a30e16c5b5b38">WebUsers</a>.</p>
</div>
</div>
<a class="anchor" id="af0b98012abb190cf4617999f008de27e"></a><!-- doxytag: member="Users::checkLoginMatch" ref="af0b98012abb190cf4617999f008de27e" args="($user, $pass)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classUsers.html#af0b98012abb190cf4617999f008de27e">checkLoginMatch</a> </td>
<td>(</td>
<td class="paramtype">$&#160;</td>
<td class="paramname"><em>user</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">$&#160;</td>
<td class="paramname"><em>pass</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td><code> [protected]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>check if username and password matches. </p>
<p>This is the base function, it should be overwritten by the <a class="el" href="classWebUsers.html" title="handles CMS/WWW related functions regarding user management &amp; registration.">WebUsers</a> class. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">$user</td><td>the inserted username </td></tr>
<tr><td class="paramname">$pass</td><td>the inserted password </td></tr>
</table>
</dd>
</dl>
<p>Reimplemented in <a class="el" href="classWebUsers.html#a11894eb69bb2f172baf5186e8f92246d">WebUsers</a>, and <a class="el" href="classWebUsers.html#a11894eb69bb2f172baf5186e8f92246d">WebUsers</a>.</p>
</div>
</div>
<a class="anchor" id="a4cb5e34b56fb6de0ec318fb59e90838f"></a><!-- doxytag: member="Users::checkPassword" ref="a4cb5e34b56fb6de0ec318fb59e90838f" args="($pass)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classUsers.html#a4cb5e34b56fb6de0ec318fb59e90838f">checkPassword</a> </td>
<td>(</td>
<td class="paramtype">$&#160;</td>
<td class="paramname"><em>pass</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>checks if the password is valid. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">$pass</td><td>the password willing to be used. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>string Info: Returns a string based on if the password is valid, if valid then "success" is returned </dd></dl>
</div>
</div>
<a class="anchor" id="adfffce17947a9f72d68838db250c9ab8"></a><!-- doxytag: member="Users::checkUser" ref="adfffce17947a9f72d68838db250c9ab8" args="($username)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classUsers.html#adfffce17947a9f72d68838db250c9ab8">checkUser</a> </td>
<td>(</td>
<td class="paramtype">$&#160;</td>
<td class="paramname"><em>username</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>checks if entered username is valid. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">$username</td><td>the username that the user wants to use. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>string Info: Returns a string based on if the username is valid, if valid then "success" is returned </dd></dl>
</div>
</div>
<a class="anchor" id="ac3a8cb9a038f6aef0bd98be091274122"></a><!-- doxytag: member="Users::checkUserNameExists" ref="ac3a8cb9a038f6aef0bd98be091274122" args="($username)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classUsers.html#ac3a8cb9a038f6aef0bd98be091274122">checkUserNameExists</a> </td>
<td>(</td>
<td class="paramtype">$&#160;</td>
<td class="paramname"><em>username</em></td><td>)</td>
<td><code> [protected]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>check if username already exists. </p>
<p>This is the base function, it should be overwritten by the <a class="el" href="classWebUsers.html" title="handles CMS/WWW related functions regarding user management &amp; registration.">WebUsers</a> class. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">$username</td><td>the username </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>string Info: Returns true or false if the user is in the www db. </dd></dl>
<p>Reimplemented in <a class="el" href="classWebUsers.html#ac3a8cb9a038f6aef0bd98be091274122">WebUsers</a>, and <a class="el" href="classWebUsers.html#ac3a8cb9a038f6aef0bd98be091274122">WebUsers</a>.</p>
</div>
</div>
<a class="anchor" id="a2f5349025bed3874f08d80652cab2fe0"></a><!-- doxytag: member="Users::confirmPassword" ref="a2f5349025bed3874f08d80652cab2fe0" args="($pass_result, $pass, $confirmpass)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classUsers.html#a2f5349025bed3874f08d80652cab2fe0">confirmPassword</a> </td>
<td>(</td>
<td class="paramtype">$&#160;</td>
<td class="paramname"><em>pass_result</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">$&#160;</td>
<td class="paramname"><em>pass</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">$&#160;</td>
<td class="paramname"><em>confirmpass</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td><code> [private]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>checks if the confirmPassword matches the original. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">$pass_result</td><td>the result of the previous password check. </td></tr>
<tr><td class="paramname">$pass</td><td>the original pass. </td></tr>
<tr><td class="paramname">$confirmpass</td><td>the confirmation password. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>string Info: Verify's $_POST["Password"] is the same as $_POST["ConfirmPass"] </dd></dl>
</div>
</div>
<a class="anchor" id="aeac9f32fd53c97c92e5c774e154399df"></a><!-- doxytag: member="Users::createPermissions" ref="aeac9f32fd53c97c92e5c774e154399df" args="($pvalues)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static <a class="el" href="classUsers.html#aeac9f32fd53c97c92e5c774e154399df">createPermissions</a> </td>
<td>(</td>
<td class="paramtype">$&#160;</td>
<td class="paramname"><em>pvalues</em></td><td>)</td>
<td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>creates permissions in the shard db for a user. </p>
<p>incase the shard is offline it will place it in the ams_querycache. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">$pvalues</td><td>with username </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ac93aebf1960fb12975b120a2c394a8af"></a><!-- doxytag: member="Users::createUser" ref="ac93aebf1960fb12975b120a2c394a8af" args="($values, $user_id)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static <a class="el" href="classUsers.html#ac93aebf1960fb12975b120a2c394a8af">createUser</a> </td>
<td>(</td>
<td class="paramtype">$&#160;</td>
<td class="paramname"><em>values</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">$&#160;</td>
<td class="paramname"><em>user_id</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>creates a user in the shard. </p>
<p>incase the shard is offline it will place it in the ams_querycache. You have to create a user first in the CMS/WWW and use the id for this function. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">$values</td><td>with name,pass and mail </td></tr>
<tr><td class="paramname">$user_id</td><td>the extern id of the user (the id given by the www/CMS) </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>ok if it's get correctly added to the shard, else return lib offline and put in libDB, if libDB is also offline return liboffline. </dd></dl>
</div>
</div>
<a class="anchor" id="afb7603ac9556c1069fbf1c0062251203"></a><!-- doxytag: member="Users::generateSALT" ref="afb7603ac9556c1069fbf1c0062251203" args="($length=2)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static <a class="el" href="classUsers.html#afb7603ac9556c1069fbf1c0062251203">generateSALT</a> </td>
<td>(</td>
<td class="paramtype">$&#160;</td>
<td class="paramname"><em>length</em> = <code>2</code></td><td>)</td>
<td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>generate a SALT. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">$length</td><td>the length of the SALT which is by default 2 </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>a random salt of 2 chars </dd></dl>
</div>
</div>
<a class="anchor" id="ad1cbb1fe6ee72f46dc385bec6e274363"></a><!-- doxytag: member="Users::setAmsEmail" ref="ad1cbb1fe6ee72f46dc385bec6e274363" args="($user, $mail)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classUsers.html#ad1cbb1fe6ee72f46dc385bec6e274363">setAmsEmail</a> </td>
<td>(</td>
<td class="paramtype">$&#160;</td>
<td class="paramname"><em>user</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">$&#160;</td>
<td class="paramname"><em>mail</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td><code> [protected]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>sets the shards email. </p>
<p>in case the shard is offline, the entry will be stored in the ams_querycache. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">$user</td><td>the usersname of the account of which we want to change the emailaddress. </td></tr>
<tr><td class="paramname">$mail</td><td>the new email address </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>ok if it worked, if the lib or shard is offline it will return liboffline or shardoffline. </dd></dl>
</div>
</div>
<a class="anchor" id="ab89812058b0a71baf492af4652d67501"></a><!-- doxytag: member="Users::setAmsPassword" ref="ab89812058b0a71baf492af4652d67501" args="($user, $pass)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classUsers.html#ab89812058b0a71baf492af4652d67501">setAmsPassword</a> </td>
<td>(</td>
<td class="paramtype">$&#160;</td>
<td class="paramname"><em>user</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">$&#160;</td>
<td class="paramname"><em>pass</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td><code> [protected]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>sets the shards password. </p>
<p>in case the shard is offline, the entry will be stored in the ams_querycache. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">$user</td><td>the usersname of the account of which we want to change the password. </td></tr>
<tr><td class="paramname">$pass</td><td>the new password. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>ok if it worked, if the lib or shard is offline it will return liboffline or shardoffline. </dd></dl>
</div>
</div>
<a class="anchor" id="a73637e760498c5cea55074896ec982ac"></a><!-- doxytag: member="Users::validEmail" ref="a73637e760498c5cea55074896ec982ac" args="($email)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classUsers.html#a73637e760498c5cea55074896ec982ac">validEmail</a> </td>
<td>(</td>
<td class="paramtype">$&#160;</td>
<td class="paramname"><em>email</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>check if the emailaddress structure is valid. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">$email</td><td>the email address </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true or false </dd></dl>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/<a class="el" href="users_8php.html">users.php</a></li>
</ul>
</div><!-- contents -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr class="footer"/><address class="footer"><small>
Generated on Sun Sep 15 2013 17:49:37 for Ryzom Account Management System by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>
</body>
</html>