public function walk_users() { $user = new Influencer(null); foreach ($user->filter(array()) as $u) { $this->_walk_social($u); $this->_insert_statistics($u); } }
public function get() { if (UserSession::get('user.type') !== 'brand') { $this->_403(); } $brand = new Brand(UserSession::get('user._id')); $binfo = $brand->get(); $influencer = new Influencer(null); $favorites = array(); $lists = array(); if ($l = MongoDoc::get($binfo, 'favorites', null)) { $favorites = $influencer->filter(array('_id' => array('$in' => $l)), array('_id' => true, 'name' => true, 'username' => true)); } foreach (MongoDoc::get($binfo, 'lists', array()) as $l) { $lists[] = $l['name']; } $this->_display->view(array('main/app/brand/favorite.php'), array('favorites' => $favorites, 'lists' => $lists)); }