username) || empty($owner->username)) { //if not logged in, see world pictures instead if (!isloggedin()) forward('pg/photos/world'); forward('pg/photos/owned/' . $_SESSION['user']->username); } //set the title $title = sprintf(elgg_echo('album:user'), "$owner->name"); $area2 = elgg_view_title($title); // Get objects set_context('search'); set_input('search_viewtype', 'gallery'); $area2 .= list_entities("object", "album", page_owner(), 10); set_context('photos'); $body = elgg_view_layout('two_column_left_sidebar', '', $area2); // Finally draw the page page_draw($title, $body); ?>