Index: branches/unlabeled/unlabeled-1.36.2/kernel/include/portaluser.php =================================================================== diff -u -r5273 -r7954 --- branches/unlabeled/unlabeled-1.36.2/kernel/include/portaluser.php (.../portaluser.php) (revision 5273) +++ branches/unlabeled/unlabeled-1.36.2/kernel/include/portaluser.php (.../portaluser.php) (revision 7954) @@ -757,8 +757,42 @@ return "Undefined:$tagname"; break; } - } + } + + /** + * Sends EmailEvent to user + * + * @param string $EventName email event name + * @param mixed $ToUserId recipient's user_id or email address + * @param int $LangId language_id (not in use) + * @param string $RecptName recipient's name (only when ID not passed) + * @return kEvent + */ + function SendUserEventMail($EventName,$ToUserId,$LangId=NULL,$RecptName=NULL) + { + $object =& $this->Application->recallObject('u', null, Array ('skip_autoload' => true)); + /* @var $object kDBItem */ + + $object->Load($this->UniqueId()); + + $send_params = is_numeric($ToUserId) ? Array() : Array ('to_email' => $ToUserId, 'to_name' => $RecptName); + $status = $this->Application->EmailEventUser($EventName, $ToUserId, $send_params); + $object->Load($this->Application->RecallVar('user_id')); + return $status; + } + function SendAdminEventMail($EventName,$LangId=NULL) + { + $object =& $this->Application->recallObject('u', null, Array ('skip_autoload' => true)); + /* @var $object kDBItem */ + + $object->Load($this->UniqueId()); + + $status = $this->Application->EmailEventAdmin($EventName); + $object->Load($this->Application->RecallVar('user_id')); + return $status; + } + } /* class clsPortalUser*/