Last change
on this file since 133 was
131,
checked in by jkraaijeveld, 14 years ago
|
Deleted previous database classes
Submitted (partial) new database connection
|
File size:
564 bytes
|
Rev | Line | |
---|
[131] | 1 | <?php |
---|
| 2 | |
---|
| 3 | /** |
---|
| 4 | * Description of User |
---|
| 5 | * |
---|
| 6 | * @author jkraaijeveld |
---|
| 7 | */ |
---|
| 8 | |
---|
| 9 | class 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.