source: Dev/trunk/classes/User.php @ 187

Last change on this file since 187 was 187, checked in by jkraaijeveld, 13 years ago

Cleaned up some mess regarding lazy evaluation: classes without references no longer require a method evaluate(). Rather, ResearchToolObject? has a plain evaluate returning true in this case. Classes with references should override this method.

File size: 561 bytes
Line 
1<?php
2
3/**
4 * Description of User
5 *
6 * @author jkraaijeveld
7 */
8
9class User extends ResearchToolObject {
10   
11    public $name;
12    public $password;
13   
14    /**
15     * Constructor of User
16     * If the user does not yet exist in the database, call with null as first parameter
17     */
18    public function __construct($uid = null, $name = null, $password = null) {
19        if(!isset($uid))
20        {
21             $uid = md5(uniqid(rand(), true));
22        }
23        $this->uid = $uid;
24        $this->name = $name;
25        $this->password = $password;
26        }
27}
28
29?>
Note: See TracBrowser for help on using the repository browser.