public function __construct() { $title = getInput("title"); $description = getInput("description"); $access_id = getInput("access_id"); Security::checkForEmptyFields(array("title")); $logged_in_user = getLoggedInUser(); $logged_in_user_guid = $logged_in_user->guid; $album = new Photoalbum(); $album->title = $title; $album->description = $description; $album->owner_guid = $logged_in_user_guid; $album->access_id = $access_id; $album->save(); $album->createAvatar(); new Activity(getLoggedInUserGuid(), "activity:add:photo:album", array(getLoggedInUser()->getURL(), getLoggedInUser()->full_name, $album->getURL(), $album->title, "<a href='" . $album->getURL() . "'>" . $album->icon(EXTRALARGE, "img-responsive") . "</a>")); new SystemMessage("Your album has been created."); forward("photos"); }