The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Automatically Send PM Upon Password Reset
I'm trying to get this Plugin to work.
Hook Location: reset_password Code: Code:
require_once(DIR . '/includes/functions_wysiwyg.php'); $message = construct_phrase($vbphrase['passwordreset_servernotification'], $vbulletin->userinfo['username']); $title = construct_phrase($vbphrase['passwordreset_servernotification_title']); // create the DM to do error checking and insert the new PM $pmdm =& datamanager_init('PM', $vbulletin, ERRTYPE_ARRAY); $recipient_uid = $vbulletin->GPC['u']; $recipient_username = $vbulletin->GPC[$recipient_uid]; $pmdm->set('fromuserid', 5); $pmdm->set('fromusername', 'System'); $pmdm->set('title', $title); $pmdm->overridequota = true; $pmdm->set('allowsmilie', true); $pmdm->set('showsignature', true); $pmdm->set_recipients($recipient_username, $botperms); //$message_n = convert_wysiwyg_html_to_bbcode($message); $pmdm->set('message', '$message'); $pmdm->set('dateline', TIMENOW); $pmdm->set_info('savecopy', 0); $pmdm->save(); If you can't tell, I'm trying to make it so after a user recovers their password and logs back into the Forum, they have a new unread PM telling them what's in $vbphrase['passwordreset_servernotification'] Thanks for any help! --------------- Added 15 Mar 2012 at 18:52 --------------- Fixed. Needed to change this: $recipient_uid = $vbulletin->GPC['u']; $recipient_username = fetch_userinfo($recipient_uid); $pmdm->set_recipients($recipient_username['username'], $botperms); |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|