예제 #1
0
 /**
  * @param SJB_User $user
  * @return boolean
  */
 public static function notifyOnUserDeleted(SJB_User $user)
 {
     if (SJB_UserNotificationsManager::isUserNotifiedOnProfileDeletion($user->getSID())) {
         $userGroupSID = $user->getUserGroupSID();
         $emailTplSID = SJB_UserGroupManager::getEmailTemplateSIDByUserGroupAndField($userGroupSID, 'notify_user_on_deletion');
         $user = SJB_UserManager::createTemplateStructureForUser($user);
         $data = array('user' => $user);
         $email = SJB_EmailTemplateEditor::getEmail($user['email'], $emailTplSID, $data);
         return $email->send('User Deleted');
     }
     return false;
 }