1497ae1feSGreg Roach<?php 23976b470SGreg Roach 3497ae1feSGreg Roach/** 4497ae1feSGreg Roach * webtrees: online genealogy 5*89f7189bSGreg Roach * Copyright (C) 2021 webtrees development team 6497ae1feSGreg Roach * This program is free software: you can redistribute it and/or modify 7497ae1feSGreg Roach * it under the terms of the GNU General Public License as published by 8497ae1feSGreg Roach * the Free Software Foundation, either version 3 of the License, or 9497ae1feSGreg Roach * (at your option) any later version. 10497ae1feSGreg Roach * This program is distributed in the hope that it will be useful, 11497ae1feSGreg Roach * but WITHOUT ANY WARRANTY; without even the implied warranty of 12497ae1feSGreg Roach * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13497ae1feSGreg Roach * GNU General Public License for more details. 14497ae1feSGreg Roach * You should have received a copy of the GNU General Public License 15*89f7189bSGreg Roach * along with this program. If not, see <https://www.gnu.org/licenses/>. 16497ae1feSGreg Roach */ 17fcfa147eSGreg Roach 18497ae1feSGreg Roachdeclare(strict_types=1); 19497ae1feSGreg Roach 20497ae1feSGreg Roachnamespace Fisharebest\Webtrees; 21497ae1feSGreg Roach 22497ae1feSGreg Roachuse Fisharebest\Webtrees\Contracts\UserInterface; 23497ae1feSGreg Roach 24497ae1feSGreg Roach/** 25497ae1feSGreg Roach * The site can act as a user, for example to send email. 264c9729fbSGreg Roach * 274c9729fbSGreg Roach * Some SMTP servers insist that this is a real/validated email address. 284c9729fbSGreg Roach * Others are happy to accept no-reply@localhost. 29497ae1feSGreg Roach */ 30497ae1feSGreg Roachclass SiteUser implements UserInterface 31497ae1feSGreg Roach{ 32497ae1feSGreg Roach /** 33497ae1feSGreg Roach * The user‘s internal identifier. 34497ae1feSGreg Roach * 35497ae1feSGreg Roach * @return int 36497ae1feSGreg Roach */ 37497ae1feSGreg Roach public function id(): int 38497ae1feSGreg Roach { 39497ae1feSGreg Roach return 0; 40497ae1feSGreg Roach } 41497ae1feSGreg Roach 42497ae1feSGreg Roach /** 43497ae1feSGreg Roach * The users email address. 44497ae1feSGreg Roach * 45497ae1feSGreg Roach * @return string 46497ae1feSGreg Roach */ 47497ae1feSGreg Roach public function email(): string 48497ae1feSGreg Roach { 49502cab90SGreg Roach return ''; 50497ae1feSGreg Roach } 51497ae1feSGreg Roach 52497ae1feSGreg Roach /** 53497ae1feSGreg Roach * The user‘s real name. 54497ae1feSGreg Roach * 55497ae1feSGreg Roach * @return string 56497ae1feSGreg Roach */ 57497ae1feSGreg Roach public function realName(): string 58497ae1feSGreg Roach { 594c9729fbSGreg Roach return Webtrees::NAME; 60497ae1feSGreg Roach } 61497ae1feSGreg Roach 62497ae1feSGreg Roach /** 63497ae1feSGreg Roach * The user‘s login name. 64497ae1feSGreg Roach * 65497ae1feSGreg Roach * @return string 66497ae1feSGreg Roach */ 67497ae1feSGreg Roach public function userName(): string 68497ae1feSGreg Roach { 69497ae1feSGreg Roach return ''; 70497ae1feSGreg Roach } 71497ae1feSGreg Roach 72497ae1feSGreg Roach /** 73497ae1feSGreg Roach * @param string $setting_name 74497ae1feSGreg Roach * @param string $default 75497ae1feSGreg Roach * 76497ae1feSGreg Roach * @return string 77497ae1feSGreg Roach */ 78497ae1feSGreg Roach public function getPreference(string $setting_name, string $default = ''): string 79497ae1feSGreg Roach { 80497ae1feSGreg Roach return $default; 81497ae1feSGreg Roach } 82497ae1feSGreg Roach 83497ae1feSGreg Roach /** 84497ae1feSGreg Roach * @param string $setting_name 85497ae1feSGreg Roach * @param string $setting_value 86497ae1feSGreg Roach * 877c4add84SGreg Roach * @return void 88497ae1feSGreg Roach */ 897c4add84SGreg Roach public function setPreference(string $setting_name, string $setting_value): void 90497ae1feSGreg Roach { 91497ae1feSGreg Roach } 92497ae1feSGreg Roach} 93