Call to a member function trigger() on null
Please Log in to join the conversation.
$newUser->set( 'approved', 1 );
$newUser->set( 'confirmed', 0 );
$newUser->set( 'block', 1 );
Please Log in to join the conversation.
Please Log in to join the conversation.
Yes. So for example at the bottom add a new custom trigger to act on so you're only giving a subscription for this specific behavior.For instance I use the first one to sync and the second one to attribute a subscription ?
$newUser = new \CB\Database\Table\UserTable();
$newUser->load( (int) '[var1_id]' );
if ( ! $newUser->getInt( 'id', 0 ) ) {
return;
}
$newUser->set( 'approved', 1 );
$newUser->set( 'confirmed', 0 );
$newUser->set( 'block', 1 );
if ( ! $newUser->store() ) {
return;
}
activateUser( $newUser, 1, 'UserRegistration' );
$_PLUGINS->trigger( 'onAfterUserRegistration', [ &$newUser, &$newUser, true ] );
$_PLUGINS->trigger( 'onAfterSyncRSTicketPro', [ &$newUser ] );
Please Log in to join the conversation.