Platform  3.1
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
Data/Class.User.php
Go to the documentation of this file.
1 <?php
2 /*
3  * @author Anakeen
4  * @license http://creativecommons.org/licenses/by-nc-sa/2.0/fr/ Anakeen - licence CC
5  * @package FDL
6 */
7 /**
8  * User Document Object Definition
9  *
10  * @author Anakeen 2002
11  * @version $Id: $
12  * @license http://creativecommons.org/licenses/by-nc-sa/2.0/fr/ Anakeen - licence CC
13  * @package FDL
14  */
15 /**
16  */
17 include_once ("DATA/Class.Document.php");
18 /**
19  * Document Class
20  *
21  */
22 class Fdl_User
23 {
24  private $_user = null;
25 
26  function __construct(&$user)
27  {
28  if ($user) {
29  $this->_user = $user;
30  }
31  }
32  /**
33  * return document list
34  * @return array Document
35  */
36  function getUser()
37  {
38 
39  if (!$this->_user) {
40  $this->error = sprintf(_("user not initialized"));
41  return null;
42  } else {
43  $ti = array(
44  "id",
45  "mail",
46  "fid",
47  "firstname",
48  "lastname",
49  "login"
50  );
51  foreach ($ti as $i) $info->$i = $this->_user->$i;
52  $info->locale = getParam("CORE_LANG");
53  $out->info = $info;
54  $out->localeFormat = getLocaleConfig();
55  }
56  $out->error = $this->error;
57  return $out;
58  }
59 }
60 ?>
← centre documentaire © anakeen - published under CC License - Dynacase