* CRM/Memberdashboard/Page/MemberDashboard.php (loadContact): Use API.
(run): '$contact' is now an array.
* @return CRM_Contact
*/
function loadContact() {
- $session = CRM_Core_Session::singleton();
- $params = array('contact_id' => $session->get('userID'));
- $defaults = array();
- return CRM_Contact_BAO_Contact::retrieve($params, $defaults);
+ return civicrm_api3('contact', 'getsingle', array(
+ 'id' => CRM_Core_Session::singleton()->get('userID')
+ ));
}
/**
* @return Title string
*/
function pageTitle() {
- return ts('Welcome, ') . $this->contact->first_name . '!';
+ return ts('Welcome, ') . $this->contact['first_name'] . '!';
}
function run() {