summaryrefslogtreecommitdiff
path: root/demos/blog/protected/Pages/Users/ViewUser.php
blob: 3485f56bc5270bbd72abe5f737908582bbf08db8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?php

class ViewUser extends BlogPage
{
	private $_currentUser=null;

	public function getCurrentUser()
	{
		if($this->_currentUser===null)
		{
			$id=TPropertyValue::ensureInteger($this->Request['id']);
			if(($this->_currentUser=$this->DataAccess->queryUserByID($id))===null)
				throw new BlogException('xxx');
		}
		return $this->_currentUser;
	}
}

?>