When the user doesn't exist in AcyMailing and when we create them we set them as confirmed.
New AcyMailing User
Code:
$newSubscriber = new stdClass();
$newSubscriber->email = $user->getString( 'email' );
$newSubscriber->name = $user->getString( 'name' );
if ( $this->acyMailingVersion() === 6 ) {
$newSubscriber->cms_id = $user->getInt( 'id', 0 );
$newSubscriber->source = 'joomla';
$newSubscriber->active = 1;
if ( class_exists( '\AcyMailing\Classes\UserClass' ) ) {
$acyUser->sendConf = false;
}
} else {
$newSubscriber->userid = $user->getInt( 'id', 0 );
$newSubscriber->created = cbpaidTimes::getInstance()->strToTime( $user->getString( 'registerDate' ) );
$newSubscriber->enabled = 1;
$newSubscriber->accept = 1;
$newSubscriber->ip = $user->getString( 'registeripaddr' );
$newSubscriber->html = 1;
}
$newSubscriber->confirmed = 1;
$subscriberId = $acyUser->save( $newSubscriber );
When they already exist we don't touch their status at all. So I've no idea why they'd suddenly become unconfirmed.
Existing AcyMailing User
Code:
if ( ! $subscriber->cms_id ) {
$subscriber->cms_id = $user->getInt( 'id', 0 );
$subscriber->source = 'joomla';
$acyUser->save( $subscriber );
}
If the API has changed I don't have any issues with updating it.