Use verifyToken()

[MAILPOET-2340]
This commit is contained in:
Amine Ben hammou
2019-09-19 17:22:57 +01:00
committed by Jack Kitterhing
parent bc31ca6c6d
commit e588ebcee9
5 changed files with 22 additions and 17 deletions

View File

@ -115,16 +115,6 @@ class Subscriber extends Model {
return self::where('wp_user_id', $wp_user->ID)->findOne();
}
function verifyToken($token) {
$database_token = (new LinkTokens)->getToken($this);
$request_token = substr($token, 0, strlen($database_token));
return call_user_func(
'hash_equals',
$database_token,
$request_token
);
}
static function filterOutReservedColumns(array $subscriber_data) {
$reserved_columns = [
'id',