Decrease length of old tokens to 6 chars
[MAILPOET-2364]
This commit is contained in:
committed by
Jack Kitterhing
parent
5cbcefbbb4
commit
7ea33310e8
@ -38,7 +38,9 @@ class Subscriber extends Model {
|
||||
const STATUS_BOUNCED = 'bounced';
|
||||
const STATUS_INACTIVE = 'inactive';
|
||||
|
||||
const DEPRECATED_LINK_TOKEN_LENGTH = 6;
|
||||
const LINK_TOKEN_LENGTH = 32;
|
||||
|
||||
/** @var string|bool */
|
||||
public $token;
|
||||
|
||||
@ -121,7 +123,10 @@ class Subscriber extends Model {
|
||||
return self::where('wp_user_id', $wp_user->ID)->findOne();
|
||||
}
|
||||
|
||||
static function generateToken($email = null, $length = 32) {
|
||||
/**
|
||||
* @deprecated Only for backward compatibility for old tokens
|
||||
*/
|
||||
static function generateToken($email = null, $length = self::DEPRECATED_LINK_TOKEN_LENGTH) {
|
||||
if ($email !== null) {
|
||||
$auth_key = '';
|
||||
if (defined('AUTH_KEY')) {
|
||||
|
Reference in New Issue
Block a user