Quote:
Originally Posted by Andreas
userdata_postsave
PHP Code:
if ($usergroups_changed)
{
$pmdm =& datamanager_init('PM', $this->registry, ERRTYPE_SILENT);
$pmdm->set('fromuserid', 13454);
$pmdm->set('fromusername', 'Sendername');
eval(fetch_email_phrases('usergroupschanged', $this->fetch_field('languageid')));
$pmdm->set('title', $subject);
$pmdm->set('message', $message);
$botperms = array('adminpermissions' => 2);
$pmdm->set_recipients($this->fetch_field('username'), $botperms); // Ignore PM-Box full
$pmdm->set('dateline', TIMENOW);
$pmdm->save();
}
Adjust fromusername, fromuserid as you need and create a phrase usergroupschanged in phrasegroups EMail Body Text/EMail Subject Text - that's it
|
Creating the phrase 'usergroupchanged' is fine but can you clarify 'EMail Body Text/EMail Subject Text' - Are these other phrases I need to create or just change in the .php file?
How Do I run this and how is this installed?
Do standard variables work in this suchs as $username etc?