Subversion-Projekte lars-tiefland.prado

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?php
2
/**
3
 * BlogUser class file
4
 *
5
 * @author Qiang Xue <qiang.xue@gmail.com>
6
 * @link http://www.pradosoft.com/
7
 * @copyright Copyright &copy; 2006 PradoSoft
8
 * @license http://www.pradosoft.com/license/
9
 * @version $Id: BlogUser.php 1398 2006-09-08 19:31:03Z xue $
10
 */
11
 
12
Prado::using('System.Security.TUser');
13
 
14
/**
15
 * BlogUser class
16
 *
17
 * @author Qiang Xue <qiang.xue@gmail.com>
18
 * @link http://www.pradosoft.com/
19
 * @copyright Copyright &copy; 2006 PradoSoft
20
 * @license http://www.pradosoft.com/license/
21
 */
22
class BlogUser extends TUser
23
{
24
	private $_id;
25
 
26
	public function getID()
27
	{
28
		return $this->_id;
29
	}
30
 
31
	public function setID($value)
32
	{
33
		$this->_id=$value;
34
	}
35
 
36
	public function getIsAdmin()
37
	{
38
		return $this->isInRole('admin');
39
	}
40
 
41
	public function saveToString()
42
	{
43
		$a=array($this->_id,parent::saveToString());
44
		return serialize($a);
45
	}
46
 
47
	public function loadFromString($data)
48
	{
49
		if(!empty($data))
50
		{
51
			list($id,$str)=unserialize($data);
52
			$this->_id=$id;
53
			return parent::loadFromString($str);
54
		}
55
		else
56
			return $this;
57
	}
58
}
59
 
60
?>