Allow name change

This commit is contained in:
Sándor 2021-09-20 12:29:59 +02:00
parent a3768e996d
commit f120fb88d3

View File

@ -89,7 +89,8 @@ class ninjaMailSubscription extends ninjaMail
{
private $list;
private $activated = false;
private $activated = 0;
private $forcenamechange = 0;
public function list($id)
{
@ -108,6 +109,13 @@ class ninjaMailSubscription extends ninjaMail
return true;
}
public function namechange($s)
{
if ($s) $this->forcenamechange = 1;
else $this->forcenamechange = 0;
return true;
}
public function subscribe($email, $name = '')
{
if (!$this->list || !is_numeric($this->activated))
@ -117,7 +125,8 @@ class ninjaMailSubscription extends ninjaMail
'list' => $this->list,
'name' => $name,
'email' => $email,
'activated' => $this->activated
'activated' => $this->activated,
'forcenamechange' => $this->forcenamechange
];
return $this->process('subscribe', $post, true)->status == 'success' ? true : false;
}