Fix tests
This commit is contained in:
committed by
Jack Kitterhing
parent
3ea9c99090
commit
b4bb6dd747
@ -106,7 +106,8 @@ class Subscriber extends Model {
|
||||
function getLinkToken() {
|
||||
if ($this->link_token === null) {
|
||||
$this->link_token = self::generateToken($this->email);
|
||||
$this->save();
|
||||
// `$this->save()` fails if the subscriber has subscriptions, segments or custom fields
|
||||
\ORM::rawExecute(sprintf('UPDATE %s SET link_token = ? WHERE email = ?', self::$_table), [$this->link_token, $this->email]);
|
||||
}
|
||||
return $this->link_token;
|
||||
}
|
||||
|
Reference in New Issue
Block a user