From 6e0338629774fffe5fbe7136dfce34ce83844a5c Mon Sep 17 00:00:00 2001 From: xue <> Date: Tue, 30 May 2006 03:26:33 +0000 Subject: Blog demo is completed. --- demos/blog/protected/Common/BlogUser.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'demos/blog/protected/Common/BlogUser.php') diff --git a/demos/blog/protected/Common/BlogUser.php b/demos/blog/protected/Common/BlogUser.php index af49c8d7..42a171a6 100644 --- a/demos/blog/protected/Common/BlogUser.php +++ b/demos/blog/protected/Common/BlogUser.php @@ -1,7 +1,24 @@ + * @link http://www.pradosoft.com/ + * @copyright Copyright © 2006 PradoSoft + * @license http://www.pradosoft.com/license/ + * @version $Revision: $ $Date: $ + */ Prado::using('System.Security.TUser'); +/** + * BlogUser class + * + * @author Qiang Xue + * @link http://www.pradosoft.com/ + * @copyright Copyright © 2006 PradoSoft + * @license http://www.pradosoft.com/license/ + */ class BlogUser extends TUser { private $_id; @@ -16,6 +33,11 @@ class BlogUser extends TUser $this->_id=$value; } + public function getIsAdmin() + { + return $this->isInRole('admin'); + } + public function saveToString() { $a=array($this->_id,parent::saveToString()); -- cgit v1.2.3