
it turns out that my PM Content give trouble. I had something like $email and $username in the content, that your PM doesnt like.
anyway, I remove those variables, and it's working now.
Quote:
Originally Posted by Andreas
The PM is only sent once, but there are three Plugins required as there could be different situations where the PM must be sent:
- After Reistration if you don't moderate new memebers and don't verify emails
- After eMail activation if you don't moderate members
- After approval if you moderate members.
|
... for this, if I just want to send PM when new member just register (even if he need to verify email and moderate), can I disable other two plugin and change the plugin at register_addmember_complete, using the following code?
PHP Code:
if $vbulletin->options['welcomepmuserid'])
{
// $vbulletin->userinfo['usergroupid'] = 2;
$vbulletin->userinfo['permissions'] = cache_permissions($vbulletin->userinfo, false);
$fromuser = fetch_userinfo($vbulletin->options['welcomepmuserid']);
$registry =& $vbulletin;
eval(fetch_email_phrases('welcomepm'));
// create the DM to do error checking and insert the new PM
$pmdm =& datamanager_init('PM', $vbulletin, ERRTYPE_SILENT);
$pmdm->set('fromuserid', $fromuser['userid']);
$pmdm->set('fromusername', $fromuser['username']);
$pmdm->set_info('recept', false);
$pmdm->set_info('savecopy', false);
$pmdm->set('title', $subject);
$pmdm->set('message', $message);
$pmdm->set_recipients($vbulletin->GPC['username'], $fromuser['permissions']);
$pmdm->set('dateline', TIMENOW);
$pmdm->save();
}
or ... options to turn ON/OFF PM at each step (if user need to go through), and use different PMs for each step could be even better

)