mirror of
https://github.com/pi-hole/web.git
synced 2026-04-25 11:19:59 +01:00
Fix 579 | Add interface option for administrator email address (Redo of #757)
Signed-off-by: Kevin Kirsche <Kev.Kirsche@gmail.com>
This commit is contained in:
@@ -452,6 +452,19 @@ function readAdlists()
|
||||
{
|
||||
exec('sudo pihole -a -c');
|
||||
}
|
||||
$adminemail = trim($_POST["adminemail"]);
|
||||
if(strlen($adminemail) == 0 || !isset($adminemail))
|
||||
{
|
||||
$adminemail = 'noadminemail';
|
||||
}
|
||||
elseif(!filter_var($adminemail, FILTER_VALIDATE_EMAIL))
|
||||
{
|
||||
$error .= "Administrator email address (".htmlspecialchars($adminemail).") is invalid!<br>";
|
||||
}
|
||||
else
|
||||
{
|
||||
exec('sudo pihole -a -e '.$adminemail);
|
||||
}
|
||||
if(isset($_POST["boxedlayout"]))
|
||||
{
|
||||
exec('sudo pihole -a layout boxed');
|
||||
|
||||
Reference in New Issue
Block a user