14c9729fbSGreg Roach<?php 23976b470SGreg Roach 34c9729fbSGreg Roach/** 44c9729fbSGreg Roach * webtrees: online genealogy 5*89f7189bSGreg Roach * Copyright (C) 2021 webtrees development team 64c9729fbSGreg Roach * This program is free software: you can redistribute it and/or modify 74c9729fbSGreg Roach * it under the terms of the GNU General Public License as published by 84c9729fbSGreg Roach * the Free Software Foundation, either version 3 of the License, or 94c9729fbSGreg Roach * (at your option) any later version. 104c9729fbSGreg Roach * This program is distributed in the hope that it will be useful, 114c9729fbSGreg Roach * but WITHOUT ANY WARRANTY; without even the implied warranty of 124c9729fbSGreg Roach * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 134c9729fbSGreg Roach * GNU General Public License for more details. 144c9729fbSGreg 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/>. 164c9729fbSGreg Roach */ 17fcfa147eSGreg Roach 184c9729fbSGreg Roachdeclare(strict_types=1); 194c9729fbSGreg Roach 204c9729fbSGreg Roachnamespace Fisharebest\Webtrees; 214c9729fbSGreg Roach 224c9729fbSGreg Roachuse Fisharebest\Webtrees\Contracts\UserInterface; 234c9729fbSGreg Roach 244c9729fbSGreg Roach/** 251f244d77SGreg Roach * A fake user that cannot receive email. 264c9729fbSGreg Roach */ 274c9729fbSGreg Roachclass NoReplyUser implements UserInterface 284c9729fbSGreg Roach{ 294c9729fbSGreg Roach /** 304c9729fbSGreg Roach * The user‘s internal identifier. 314c9729fbSGreg Roach * 324c9729fbSGreg Roach * @return int 334c9729fbSGreg Roach */ 344c9729fbSGreg Roach public function id(): int 354c9729fbSGreg Roach { 364c9729fbSGreg Roach return 0; 374c9729fbSGreg Roach } 384c9729fbSGreg Roach 394c9729fbSGreg Roach /** 404c9729fbSGreg Roach * The users email address. 414c9729fbSGreg Roach * 424c9729fbSGreg Roach * @return string 434c9729fbSGreg Roach */ 444c9729fbSGreg Roach public function email(): string 454c9729fbSGreg Roach { 464c9729fbSGreg Roach return 'no-reply@localhost'; 474c9729fbSGreg Roach } 484c9729fbSGreg Roach 494c9729fbSGreg Roach /** 504c9729fbSGreg Roach * The user‘s real name. 514c9729fbSGreg Roach * 524c9729fbSGreg Roach * @return string 534c9729fbSGreg Roach */ 544c9729fbSGreg Roach public function realName(): string 554c9729fbSGreg Roach { 564c9729fbSGreg Roach return Webtrees::NAME; 574c9729fbSGreg Roach } 584c9729fbSGreg Roach 594c9729fbSGreg Roach /** 604c9729fbSGreg Roach * The user‘s login name. 614c9729fbSGreg Roach * 624c9729fbSGreg Roach * @return string 634c9729fbSGreg Roach */ 644c9729fbSGreg Roach public function userName(): string 654c9729fbSGreg Roach { 664c9729fbSGreg Roach return ''; 674c9729fbSGreg Roach } 684c9729fbSGreg Roach 694c9729fbSGreg Roach /** 704c9729fbSGreg Roach * @param string $setting_name 714c9729fbSGreg Roach * @param string $default 724c9729fbSGreg Roach * 734c9729fbSGreg Roach * @return string 744c9729fbSGreg Roach */ 754c9729fbSGreg Roach public function getPreference(string $setting_name, string $default = ''): string 764c9729fbSGreg Roach { 774c9729fbSGreg Roach return $default; 784c9729fbSGreg Roach } 794c9729fbSGreg Roach 804c9729fbSGreg Roach /** 814c9729fbSGreg Roach * @param string $setting_name 824c9729fbSGreg Roach * @param string $setting_value 834c9729fbSGreg Roach * 847c4add84SGreg Roach * @return void 854c9729fbSGreg Roach */ 867c4add84SGreg Roach public function setPreference(string $setting_name, string $setting_value): void 874c9729fbSGreg Roach { 884c9729fbSGreg Roach } 894c9729fbSGreg Roach} 90