1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-07-02 22:45:02 +03:00
ifhub.club/classes/blocks/BlockUserfeedBlogs.class.php

17 lines
585 B
PHP
Raw Normal View History

2011-05-30 17:14:56 +03:00
<?php
class BlockUserfeedBlogs extends Block
{
public function Exec() {
2011-07-31 10:08:27 +03:00
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);
}
}
2011-05-30 17:14:56 +03:00
}