mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-12-23 15:12:44 +03:00
454 lines
12 KiB
HTML
454 lines
12 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
|
|
<title>Class User_Model</title>
|
|
|
|
<link rel="stylesheet" href="resources/bootstrap.min.css?08b23951ef4599ca9cbf1f902d0e8290c9653ddd">
|
|
<link rel="stylesheet" href="resources/style.css?062e9e59e0b8c44fbaaded5b7ffc21f907b78669">
|
|
|
|
</head>
|
|
|
|
<body>
|
|
<div id="navigation" class="navbar navbar-fixed-top">
|
|
<div class="navbar-inner">
|
|
<div class="container">
|
|
<a href="index.html" class="brand">Overview</a>
|
|
<div class="nav-collapse">
|
|
<ul class="nav">
|
|
<li class="active">
|
|
<span>Class</span> </li>
|
|
|
|
<li class="divider-vertical"></li>
|
|
|
|
<li>
|
|
<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
|
|
</li>
|
|
<li>
|
|
<a href="todo.html" title="Todo list"><span>Todo</span></a>
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="left">
|
|
<div id="menu">
|
|
<form id="search" class="form-search">
|
|
<input type="hidden" name="cx" value="">
|
|
<input type="hidden" name="ie" value="UTF-8">
|
|
<input type="text" name="q" class="search-query" placeholder="Search">
|
|
</form>
|
|
|
|
|
|
<div id="groups">
|
|
</div>
|
|
|
|
|
|
<div id="elements">
|
|
<h3>Classes</h3>
|
|
<ul>
|
|
<li><a href="class-Admins_Model.html">Admins_Model</a></li>
|
|
<li><a href="class-Appointments.html">Appointments</a></li>
|
|
<li><a href="class-Appointments_Model.html">Appointments_Model</a></li>
|
|
<li><a href="class-Backend.html">Backend</a></li>
|
|
<li><a href="class-Backend_api.html">Backend_api</a></li>
|
|
<li><a href="class-Customers_Model.html">Customers_Model</a></li>
|
|
<li><a href="class-Errors.html">Errors</a></li>
|
|
<li><a href="class-Google.html">Google</a></li>
|
|
<li><a href="class-Google_Sync.html">Google_Sync</a></li>
|
|
<li><a href="class-Notifications.html">Notifications</a></li>
|
|
<li><a href="class-Providers_Model.html">Providers_Model</a></li>
|
|
<li><a href="class-Roles_Model.html">Roles_Model</a></li>
|
|
<li><a href="class-Secretaries_Model.html">Secretaries_Model</a></li>
|
|
<li><a href="class-Services_Model.html">Services_Model</a></li>
|
|
<li><a href="class-Settings_Model.html">Settings_Model</a></li>
|
|
<li><a href="class-Test.html">Test</a></li>
|
|
<li><a href="class-Unit_tests.html">Unit_tests</a></li>
|
|
<li><a href="class-Unit_tests_admins_model.html">Unit_tests_admins_model</a></li>
|
|
<li><a href="class-Unit_tests_appointments_model.html">Unit_tests_appointments_model</a></li>
|
|
<li><a href="class-Unit_tests_customers_model.html">Unit_tests_customers_model</a></li>
|
|
<li><a href="class-Unit_tests_providers_model.html">Unit_tests_providers_model</a></li>
|
|
<li><a href="class-Unit_tests_secretaries_model.html">Unit_tests_secretaries_model</a></li>
|
|
<li><a href="class-Unit_tests_services_model.html">Unit_tests_services_model</a></li>
|
|
<li><a href="class-Unit_tests_settings_model.html">Unit_tests_settings_model</a></li>
|
|
<li><a href="class-User.html">User</a></li>
|
|
<li class="active"><a href="class-User_Model.html">User_Model</a></li>
|
|
</ul>
|
|
|
|
<h3>Interfaces</h3>
|
|
<ul>
|
|
<li><a href="class-Admins_Model.html">Admins_Model</a></li>
|
|
<li><a href="class-Appointments.html">Appointments</a></li>
|
|
<li><a href="class-Appointments_Model.html">Appointments_Model</a></li>
|
|
<li><a href="class-Backend.html">Backend</a></li>
|
|
<li><a href="class-Backend_api.html">Backend_api</a></li>
|
|
<li><a href="class-Customers_Model.html">Customers_Model</a></li>
|
|
<li><a href="class-Errors.html">Errors</a></li>
|
|
<li><a href="class-Google.html">Google</a></li>
|
|
<li><a href="class-Google_Sync.html">Google_Sync</a></li>
|
|
<li><a href="class-Notifications.html">Notifications</a></li>
|
|
<li><a href="class-Providers_Model.html">Providers_Model</a></li>
|
|
<li><a href="class-Roles_Model.html">Roles_Model</a></li>
|
|
<li><a href="class-Secretaries_Model.html">Secretaries_Model</a></li>
|
|
<li><a href="class-Services_Model.html">Services_Model</a></li>
|
|
<li><a href="class-Settings_Model.html">Settings_Model</a></li>
|
|
<li><a href="class-Test.html">Test</a></li>
|
|
<li><a href="class-Unit_tests.html">Unit_tests</a></li>
|
|
<li><a href="class-Unit_tests_admins_model.html">Unit_tests_admins_model</a></li>
|
|
<li><a href="class-Unit_tests_appointments_model.html">Unit_tests_appointments_model</a></li>
|
|
<li><a href="class-Unit_tests_customers_model.html">Unit_tests_customers_model</a></li>
|
|
<li><a href="class-Unit_tests_providers_model.html">Unit_tests_providers_model</a></li>
|
|
<li><a href="class-Unit_tests_secretaries_model.html">Unit_tests_secretaries_model</a></li>
|
|
<li><a href="class-Unit_tests_services_model.html">Unit_tests_services_model</a></li>
|
|
<li><a href="class-Unit_tests_settings_model.html">Unit_tests_settings_model</a></li>
|
|
<li><a href="class-User.html">User</a></li>
|
|
<li class="active"><a href="class-User_Model.html">User_Model</a></li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="splitter"></div>
|
|
|
|
<div id="right">
|
|
<div id="rightInner">
|
|
<div id="content" class="class">
|
|
<h1>Class User_Model</h1>
|
|
|
|
|
|
<div class="description">
|
|
<p>Contains current user's methods.</p>
|
|
</div>
|
|
|
|
<dl class="tree well">
|
|
<dd style="padding-left:0px">
|
|
CI_Model
|
|
|
|
|
|
</dd>
|
|
<dd style="padding-left:30px">
|
|
<img src="resources/inherit.png" alt="Extended by">
|
|
<b><span>User_Model</span></b>
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="alert alert-info">
|
|
|
|
|
|
|
|
|
|
|
|
<b>Located at</b> <a href="source-class-User_Model.html#3-137" title="Go to source code">user_model.php</a>
|
|
<br>
|
|
</div>
|
|
|
|
|
|
|
|
<h2>Methods summary</h2>
|
|
<table class="summary table table-bordered table-striped methods" id="methods">
|
|
<tr data-order="__construct" id="___construct">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#___construct">#</a>
|
|
<code><a href="source-class-User_Model.html#7-12" title="Go to source code">__construct</a>( )</code>
|
|
|
|
<div class="description short">
|
|
<p>Class Constructor</p>
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
<p>Class Constructor</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="get_settings" id="_get_settings">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
array
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_get_settings">#</a>
|
|
<code><a href="source-class-User_Model.html#14-25" title="Go to source code">get_settings</a>( <span>numeric <var>$user_id</var></span> )</code>
|
|
|
|
<div class="description short">
|
|
<p>Returns the user settings from the database.</p>
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
<p>Returns the user settings from the database.</p>
|
|
|
|
|
|
<h4>Parameters</h4>
|
|
<div class="list"><dl>
|
|
<dt><var>$user_id</var></dt>
|
|
<dd>User record id of which the settings will be returned.</dd>
|
|
</dl></div>
|
|
|
|
<h4>Returns</h4>
|
|
<div class="list">
|
|
array<br>Returns an array with user settings.
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="save_settings" id="_save_settings">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
boolean
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_save_settings">#</a>
|
|
<code><a href="source-class-User_Model.html#27-54" title="Go to source code">save_settings</a>( <span>array <var>$user</var></span> )</code>
|
|
|
|
<div class="description short">
|
|
<p>This method saves the user settings into the database.</p>
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
<p>This method saves the user settings into the database.</p>
|
|
|
|
|
|
<h4>Parameters</h4>
|
|
<div class="list"><dl>
|
|
<dt><var>$user</var></dt>
|
|
<dd>Contains the current users settings.</dd>
|
|
</dl></div>
|
|
|
|
<h4>Returns</h4>
|
|
<div class="list">
|
|
boolean<br>Returns the operation result.
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="get_salt" id="_get_salt">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
string
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_get_salt">#</a>
|
|
<code><a href="source-class-User_Model.html#56-65" title="Go to source code">get_salt</a>( <span>string <var>$username</var></span> )</code>
|
|
|
|
<div class="description short">
|
|
<p>Retrieve user's salt from database.</p>
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
<p>Retrieve user's salt from database.</p>
|
|
|
|
|
|
<h4>Parameters</h4>
|
|
<div class="list"><dl>
|
|
<dt><var>$username</var></dt>
|
|
<dd>This will be used to find the user record.</dd>
|
|
</dl></div>
|
|
|
|
<h4>Returns</h4>
|
|
<div class="list">
|
|
string<br>Returns the salt db value.
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="check_login" id="_check_login">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
array|null
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_check_login">#</a>
|
|
<code><a href="source-class-User_Model.html#67-91" title="Go to source code">check_login</a>( <span>string <var>$username</var></span>, <span>type <var>$password</var></span> )</code>
|
|
|
|
<div class="description short">
|
|
<p>Performs the check of the given user credentials.</p>
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
<p>Performs the check of the given user credentials.</p>
|
|
|
|
|
|
<h4>Parameters</h4>
|
|
<div class="list"><dl>
|
|
<dt><var>$username</var></dt>
|
|
<dd>Given user's name.</dd>
|
|
<dt><var>$password</var></dt>
|
|
<dd>Given user's password (not hashed yet).</dd>
|
|
</dl></div>
|
|
|
|
<h4>Returns</h4>
|
|
<div class="list">
|
|
array|null<br><p>Returns the session data of the logged in user or null on
|
|
failure.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="get_user_display_name" id="_get_user_display_name">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
string
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_get_user_display_name">#</a>
|
|
<code><a href="source-class-User_Model.html#93-104" title="Go to source code">get_user_display_name</a>( <span>numeric <var>$user_id</var></span> )</code>
|
|
|
|
<div class="description short">
|
|
<p>Get the given user's display name (first + last name).</p>
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
<p>Get the given user's display name (first + last name).</p>
|
|
|
|
|
|
<h4>Parameters</h4>
|
|
<div class="list"><dl>
|
|
<dt><var>$user_id</var></dt>
|
|
<dd>The given user record id.</dd>
|
|
</dl></div>
|
|
|
|
<h4>Returns</h4>
|
|
<div class="list">
|
|
string<br>Returns the user display name.
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="regenerate_password" id="_regenerate_password">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
string|boolean
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_regenerate_password">#</a>
|
|
<code><a href="source-class-User_Model.html#106-136" title="Go to source code">regenerate_password</a>( <span>string <var>$username</var></span>, <span>string <var>$email</var></span> )</code>
|
|
|
|
<div class="description short">
|
|
<p>If the given arguments correspond to an existing user record, generate a new
|
|
password and send it with an email.</p>
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
<p>If the given arguments correspond to an existing user record, generate a new
|
|
password and send it with an email.</p>
|
|
|
|
|
|
<h4>Parameters</h4>
|
|
<div class="list"><dl>
|
|
<dt><var>$username</var></dt>
|
|
<dd></dd>
|
|
<dt><var>$email</var></dt>
|
|
<dd></dd>
|
|
</dl></div>
|
|
|
|
<h4>Returns</h4>
|
|
<div class="list">
|
|
string|boolean<br>Returns the new password on success or FALSE on failure.
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
</table>
|
|
|
|
|
|
|
|
<h3>Magic methods summary</h3>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div id="footer">
|
|
API documentation generated by <a href="http://apigen.org">ApiGen</a>
|
|
</div>
|
|
</div>
|
|
<script src="resources/combined.js"></script>
|
|
<script src="elementlist.js"></script>
|
|
</body>
|
|
</html>
|