コード例 #1
0
ファイル: profile.php プロジェクト: rrgarcia-tiempodev/lendr
 function getItem()
 {
     $profile = JFactory::getUser($this->_user_id);
     $userDetails = JUserHelper::getProfile($this->_user_id);
     $profile->details = isset($userDetails->profile) ? $userDetails->profile : array();
     $libraryModel = new LendrModelsLibrary();
     $libraryModel->set('_user_id', $this->_user_id);
     $profile->library = $libraryModel->getItem();
     $waitlistModel = new LendrModelsWaitlist();
     $waitlistModel->set('_waitlist', TRUE);
     $profile->waitlist = $waitlistModel->getItem();
     $wishlistModel = new LendrModelsWishlist();
     $profile->wishlist = $wishlistModel->listItems();
     $profile->isMine = JFactory::getUser()->id == $profile->id ? TRUE : FALSE;
     return $profile;
 }