This is needed because of mailserver goes down.
Will resend activation email to those classifieds where date_insert = date_edit and state = 2.
Dispatch a classified created event with data
10145
public function activationEmailResendAction() 
	{
	    $classifiedService = $this->getServiceLocator()->get('document.service.classified');
		
		try {
			$ids = $classifiedService->activationEmailResend(1);
			$data = array(
				'status' => 'success',
				'message' => implode(", ", $ids)
			);
		} catch(\Exception $e) {
			$this->getResponse()
				->setStatusCode(Response::STATUS_CODE_500);
			$data = array(
				'status' => 'danger',
				'message' => $e->getMessage()
			);
		}
		
		return new JsonModel($data);
	}
408616
def append(self, event, category=None):
        
        date = datetime.datetime.now()
        self.store.insert(0, (date, event, category))
        if len(self.store) > self.size:
            del self.store[-1]
580776
def notify_admins( from_email, to_email, beta_invite_email, count )

      @email = beta_invite_email
      @count = count
      subject = "#{@email} has registered for your app"
      mail(
          to: to_email,
          from: from_email,
          subject: subject
        )
    end
71735
def save(self, **kwargs):
        
        is_active = True
        try:
            user = get_user_model().objects.get(email=self.cleaned_data["email"])
        except get_user_model().DoesNotExist:
            user = invitation_backend().invite_by_email(
                self.cleaned_data["email"],
                **{
                    "domain": get_current_site(self.request),
                    "organization": self.cleaned_data["name"],
                    "sender": self.request.user,
                    "created": True,
                }
            )
            is_active = False
        return create_organization(
            user,
            self.cleaned_data["name"],
            self.cleaned_data["slug"],
            is_active=is_active,
        )
36462
void updatePutRegistration(boolean advertise)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "updatePutRegistration", new Boolean(advertise));

        destinationHandler.updatePostRegistration(advertise);

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "updatePutRegistration");
    }
210720
def event_happened(event_name, model)
      self.last_action = event_name
      self.last_updated_node = model
      self.updated_at = Time.zone.now
      self.save!
    end
615711
def post_event_cancel(self, id, **data):
        
        
        return self.post("/events/{0}/cancel/".format(id), data=data)
1172286
def _on_socket_push_updates(self, resp):
        
        # TODO: check to make sure resp['meta']['bundleid']==bundleid ?
        # TODO: handle added parameters
        # TODO: handle removed (isDeleted) parameters

        for item in resp['data']:
            if item['id'] in self.uniqueids:
                # then we're updating something in the parameter (or deleting)
                param = self.get_parameter(uniqueid=item['id'])
                for attr, value in item['attributes'].items():
                    if hasattr(param, "_{}".format(attr)):
                        logger.info("updates from server: setting {}@{}={}".
                                    format(attr, param.twig, value))
                        setattr(param, "_{}".format(attr), value)
            else:
                self._attach_param_from_server(item)
1062114
def updateEventRegistrations(request):
    '''
    
    '''
    if not (request.method == 'POST' and request.POST.get('event')):
        return JsonResponse({})

    invoiceItems = InvoiceItem.objects.filter(**{'finalEventRegistration__event__id': request.POST.get('event')})

    outRegs = {}
    for option in invoiceItems:
        outRegs[str(option.id)] = option.__str__()

    return JsonResponse({
        'id_invoiceItem': outRegs,
    })
1126918
def push_not_registered_user_data_task(data):
    
    lock_id = "%s-push-not-registered-user-data-task-%s" % (settings.ENV_PREFIX, data["email"])
    acquire_lock = lambda: cache.add(lock_id, "true", LOCK_EXPIRE)  # noqa: E731
    release_lock = lambda: cache.delete(lock_id)  # noqa: E731

    if acquire_lock():
        try:
            upload_not_registered_user_data(data)
        except (KeyError, NotImplementedError, MultipleMatchingUsersError):
            release_lock()
            raise
        release_lock()
240669
public function onPostActivate(PostActivateEvent $event): void
    {
        $user = $event->getUser();

        $this->ezUserAccountKeyRepository->removeByUserId($user->id);
        $this->ngUserSettingRepository->activateUser($user->id);

        $this->mailHelper
            ->sendMail(
                [$user->email => $this->getUserName($user)],
                'ngsite.user.welcome.subject',
                $this->configResolver->getParameter('template.user.mail.welcome', 'ngsite'),
                [
                    'user' => $user,
                ]
            );
    }
495371
def post_event_discounts(self, id, **data):
        
        
        return self.post("/events/{0}/discounts/".format(id), data=data)
276239
public function resend() {
    if (!$this->validate()) {
      return false;
    }
    /** @var Token $token */
    $token = Yii::createObject([
      'class' => Token::className(),
      'userId' => $this->user->id,
      'type' => Token::TYPE_CONFIRMATION,
    ]);
    $token->save(false);
    $this->mailer->sendConfirmationMessage($this->user, $token);
    Yii::$app->session->setFlash('info', Yii::t('users', 'A message has been sent to your email address. It contains a confirmation link that you must click to complete registration.'));

    return true;
  }
827781
def update_registered_subject_from_model_on_post_save(sender, instance, raw, created, using, **kwargs):
    """"""
    if not raw and not kwargs.get('update_fields'):
        try:
            instance.registration_update_or_create()
        except AttributeError as e:
            if 'registration_update_or_create' not in str(e):
                raise AttributeError(str(e))
1149827
function _onRegistryDownloaded() {
        var availableUpdates = ExtensionManager.getAvailableUpdates();
        PreferencesManager.setViewState("extensionUpdateInfo", availableUpdates);
        PreferencesManager.setViewState("lastExtensionRegistryCheckTime", (new Date()).getTime());
        $("#toolbar-extension-manager").toggleClass("updatesAvailable", availableUpdates.length > 0);
    }
121923
def event_subscription(event)
      ActiveSupport::Notifications.subscribe(event[:id]) do |*, event_id, data|
        filtered_data = data.slice(*event[:allowed_data])
        filtered_data[:event_name] = event[:id]
        filtered_data[:event_id] = event_id
        if event[:id] == "sql.active_record"
          binds = data[:binds].each_with_object({}) { |bind, output| output[bind.name] = '?' if defined?(bind.name) }
          filtered_data[:binds] = JSON.dump(binds) unless binds.empty?
        end
        Bugsnag.leave_breadcrumb(
          event[:message],
          filtered_data,
          event[:type],
          :auto
        )
      end
    end
1071304
public void delegatedAccount_email_updateUsage_POST(String email) throws IOException {
		String qPath = "/email/domain/delegatedAccount/{email}/updateUsage";
		StringBuilder sb = path(qPath, email);
		exec(qPath, "POST", sb.toString(), null);
	}