Believe there needs to be a linebreak after ; for it to parse multiple queries at once, but yes that query would set the users approval state and change their block status. However, I strongly suggest using CB Auto Actions and a code action as follows.
Action: Code
Triggers: onCPayUserStateChange
User: Automatic
Access: Everybody
Conditional 1: [var3] Equal To PLAN_ID_HERE
Conditional 2: [var2] Equal To A
Method: PHP
Code:
Code:
global $_PLUGINS, $ueConfig;
$user = CBuser::getUserDataInstance( (int) '[user_id]' );
$_PLUGINS->trigger( 'onBeforeUserApproval', array( $user, 1 ) );
$user->approved = 1;
$user->storeApproved( false );
if ( $ueConfig['emailpass'] == "1" ) {
$user->storePassword( false );
}
activateUser( $user, 1, 'UserApproval', false );
$_PLUGINS->trigger( 'onAfterUserApproval', array( $user, 1, true ) );
The above should do normal PHP approval on the user after the PLAN_ID_HERE plan has been activated. This should allow normal approval emails and triggers to fire.