1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-07-03 06:55:03 +03:00
ifhub.club/classes/blocks/BlockUserfeedBlogs.class.php
Mzhelskiy Maxim 314ea14568 fix user feed
2011-07-31 07:08:27 +00:00

17 lines
585 B
PHP

<?php
class BlockUserfeedBlogs extends Block
{
public function Exec() {
if ($oUserCurrent = $this->User_getUserCurrent()) {
$aUserSubscribes = $this->Userfeed_getUserSubscribes($oUserCurrent->getId());
$aBlogsTmp = $this->Blog_getBlogUsersByUserId($oUserCurrent->getId(), ModuleBlog::BLOG_USER_ROLE_USER);
$aBlogs = array();
foreach ($aBlogsTmp as $oUserBlog) {
$aBlogs[$oUserBlog->getBlogId()] = $oUserBlog->getBlog();
}
$this->Viewer_Assign('aUserfeedSubscribedBlogs', $aUserSubscribes['blogs']);
$this->Viewer_Assign('aUserfeedBlogs', $aBlogs);
}
}
}