Fixed theme Blogger
[vanilla-miry.git] / library / Vanilla / Vanilla.Control.Account.php
blob6cca78b1cd0736f9312e9d54ac3664ac265694c9
1 <?php
2 /**
3 * The Account control displays user account information in Vanilla.
5 * Copyright 2003 Mark O'Sullivan
6 * This file is part of Lussumo's Software Library.
7 * Lussumo's Software Library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
8 * Lussumo's Software Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
9 * You should have received a copy of the GNU General Public License along with Vanilla; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
10 * The latest source code is available at www.lussumo.com
11 * Contact Mark O'Sullivan at mark [at] lussumo [dot] com
13 * @author Mark O'Sullivan
14 * @copyright 2003 Mark O'Sullivan
15 * @license http://lussumo.com/community/gpl.txt GPL 2
16 * @package Vanilla
17 * @version 1.1.10
21 /**
22 * Displays a user's account information.
23 * @package Vanilla
25 class Account extends Control {
26 var $User; // The user object to be displayed
27 var $FatalError; // Boolean value indicating if there were any fatal errors before any delegates were reached (ie, a fatal error in the core code).
29 function Account(&$Context, &$User) {
30 $this->FatalError = 0;
31 $this->Name = 'Account';
32 $this->PostBackAction = ForceIncomingString('PostBackAction', '');
33 $this->Control($Context);
34 $this->User = &$User;
35 if ($this->Context->WarningCollector->Count() > 0) $this->FatalError = 1;
36 $this->CallDelegate('Constructor');
39 function Render() {
40 $this->CallDelegate('PreRender');
41 // Don't render anything but warnings if there are any warnings or if there is a postback
42 if ($this->PostBackAction == '') {
43 if ($this->FatalError) {
44 echo($this->Get_Warnings());
45 } else {
46 $this->User->FormatPropertiesForDisplay();
47 include(ThemeFilePath($this->Context->Configuration, 'account_profile.php'));
50 $this->CallDelegate('PostRender');