protected static function get_if_account_page_exists() { if ($page = DataObject::get_one('AccountPage')) { return $page; } user_error(_t('AccountPage.NoPage', 'No AccountPage was found. Please create one in the CMS!'), E_USER_ERROR); return null; // just to keep static analysis happy }