function __construct() { adminGateKeeper(); $logos = getEntities(array("type" => "Logo")); if ($logos) { foreach ($logos as $logo) { $logo->delete(); } } $logo = new Logo(); $logo->save(); $logo->createAvatar(); new SystemMessage("Your avatar has been uploaded."); forward("admin/logo"); }