function getAllDeckContributions() { $user_id = $_GET['id']; $user = new User(); $user->createFromID($user_id); $user->email = $user->getEmail(); $editoreddecks = $user->getEditorDecks(); $owndecks = array(); foreach ($user->getContributedDecks() as $c) { $n = new Deck(); $n->createFromIDLite($c); $owndecks[] = $n; } $this->set('editoreddecks', $editoreddecks); $this->set('owndecks', $owndecks); $this->set('profile', $user); $this->set('page_title', $user->username . ' - List of all contributed decks'); }