Add MemberDashboard page boilerplate.
[org.fsf.memberdashboard.git] / CRM / Memberdashboard / Page / MemberDashboard.php
1 <?php
2
3 require_once 'CRM/Core/Page.php';
4
5 class CRM_Memberdashboard_Page_MemberDashboard extends CRM_Core_Page {
6 public $contact = NULL;
7
8 function __construct() {
9 parent::__construct();
10
11 $this->loadContact();
12 }
13
14 function loadContact() {
15 $session = CRM_Core_Session::singleton();
16 $params = array('contact_id' => $session->get('userID'));
17 $defaults = array();
18 $this->contact = CRM_Contact_BAO_Contact::retrieve($params, $defaults);
19 }
20
21 function run() {
22 CRM_Utils_System::setTitle(ts('Welcome, ') . $this->contact->first_name . '!');
23
24 $this->assign('contact', $this->contact);
25
26 parent::run();
27 }
28 }