blob: 671e2c0a9c3182765010c290d5e680c0c30d977e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
<?php
/**
* ViewUser class file
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @link http://www.pradosoft.com/
* @copyright Copyright © 2006 PradoSoft
* @license http://www.pradosoft.com/license/
* @version $Id: ViewUser.php 3189 2012-07-12 12:16:21Z ctrlaltca $
*/
/**
* ViewUser class
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @link http://www.pradosoft.com/
* @copyright Copyright © 2006 PradoSoft
* @license http://www.pradosoft.com/license/
*/
class ViewUser extends BlogPage
{
private $_userRecord=null;
public function onInit($param)
{
parent::onInit($param);
if(($id=$this->Request['id'])!==null)
$id=TPropertyValue::ensureInteger($id);
else
$id=$this->User->ID;
if(($this->_userRecord=$this->DataAccess->queryUserByID($id))===null)
throw new BlogException(500,'profile_id_invalid',$id);
$this->_userRecord->Email=strtr(strtoupper($this->_userRecord->Email),array('@'=>' at ','.'=>' dot '));
}
public function getProfile()
{
return $this->_userRecord;
}
}
|