Executes post signup actions: sending the signal, logging in the user and
        sending the welcome email
974101
def post_signup(self, user, login_user=None, send_email=None):
        
        self.signup_signal.send(self, user=user)

        if (login_user is None and self.options["login_user_on_signup"]) or login_user:
            self._login(user, user.signup_provider)

        to_email = getattr(user, self.options["email_column"], None)
        if to_email and ((send_email is None and self.options["send_welcome_email"]) or send_email):
            template = "users/welcome.txt" if self.options["send_welcome_email"] == True else self.options["send_welcome_email"]
            current_app.features.emails.send(to_email, template, user=user)
214752
def _post_activate_injection(self):
        
        self.active = True
        self.app.signals.send("plugin_activate_post", self)
298538
def send_invitation(self, user, sender=None, **kwargs):
        
        if user.is_active:
            return False
        token = self.get_token(user)
        kwargs.update({"token": token})
        self.email_message(
            user, self.invitation_subject, self.invitation_body, sender, **kwargs
        ).send()
        return True
1065167
def user_invite(self, username, email, roles):
        

        uri = 'openstack/users'
        data = {
            "username": username,
            "email": email,
            "roles": list(set(roles))
        }
        post_body = json.dumps(data)
        resp, body = self.post(uri, body=post_body)
        self.expected_success(200, resp.status)
        body = json.loads(body)
        return rest_client.ResponseBody(resp, body)
200304
def invite_user_view(self):
        

        invite_user_form = self.InviteUserFormClass(request.form)

        if request.method == 'POST' and invite_user_form.validate():
            # Find User and UserEmail by email
            email = invite_user_form.email.data
            user, user_email = self.db_manager.get_user_and_user_email_by_email(email)
            if user:
                flash("User with that email has already registered", "error")
                return redirect(url_for('user.invite_user'))

            # Add UserInvitation
            user_invitation = self.db_manager.add_user_invitation(
                email=email,
                invited_by_user_id=current_user.id)
            self.db_manager.commit()

            try:
                # Send invite_user email
                self.email_manager.send_invite_user_email(current_user, user_invitation)
            except Exception as e:
                # delete new UserInvitation object if send fails
                self.db_manager.delete_object(user_invitation)
                self.db_manager.commit()
                raise

            # Send sent_invitation signal
            signals \
                .user_sent_invitation \
                .send(current_app._get_current_object(), user_invitation=user_invitation,
                      form=invite_user_form)

            # Flash a system message
            flash(_('Invitation has been sent.'), 'success')

            # Redirect
            safe_next_url = self._get_safe_next_url('next', self.USER_AFTER_INVITE_ENDPOINT)
            return redirect(safe_next_url)

        self.prepare_domain_translations()
        return render_template(self.USER_INVITE_USER_TEMPLATE, form=invite_user_form)
639260
def welcome(self, user):
        
        self.send_message(create_message('RoomServer', 'Please welcome {name} to the server!\nThere are currently {i} users online -\n {r}\n'.format(name=user.id, 
                          i=self.amount_of_users_connected, 
                          r=' '.join(self.user_names))))
        logging.debug('Welcoming user {user} to {room}'.format(user=user.id.name, room=self.name))
1339027
def sign_up_with(email, password)
      Capybara.exact = true
      visit new_user_registration_path
      fill_in 'Email', with: email
      fill_in 'Password', with: password
      fill_in 'Password confirmation', with: password
      click_button 'Sign up'
    end
229233
def account_activation(data = {})
      @data = {
          user: nil,
          client_ip: '0.0.0.0'
      }.merge(data || {})
      raise unless data[:user]
      mail to: data[:user].email, subject: 'Account activation'
    end
1147862
def userlogin(self, event):
        """"""

        client_uuid = event.clientuuid

        self.log(event.user, pretty=True, lvl=verbose)

        self.log('Adding client')
        self.clients[event.clientuuid] = event.user

        for topic, alert in self.alerts.items():
            self.alert(client_uuid, alert)
379963
def send_activation_email(self, user):
        
        activation_key = self.get_activation_key(user)
        context = self.get_email_context(activation_key)
        context['user'] = user
        subject = render_to_string(
            template_name=self.email_subject_template,
            context=context,
            request=self.request
        )
        # Force subject to a single line to avoid header-injection
        # issues.
        subject = ''.join(subject.splitlines())
        message = render_to_string(
            template_name=self.email_body_template,
            context=context,
            request=self.request
        )
        user.email_user(subject, message, settings.DEFAULT_FROM_EMAIL)
96560
def _send_invitation(self, enrollment, event):
        """"""

        self.log('Sending enrollment status mail to user')

        self._send_mail(self.config.invitation_subject, self.config.invitation_mail, enrollment, event)
1279795
public function notifyUser()
    {
        switch ($this->type) {
            case self::TYPE_PASSWORD_RESET:
                $event = new PasswordReset;
                break;
            case self::TYPE_ACTIVATION:
                $event = new UserActivation;
                break;
            case self::TYPE_INVITATION:
                $event = new UserInvitation;
                break;
        }

        $this->user->notify($event);
    }
245803
def do_invite(self, sender, body, args):
        """"""
        for invitee in args:
            new_member = { 'JID': invitee }
            self.invite_user(new_member, inviter=sender)
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,
                ]
            );
    }
837264
function signup(){
    console.log('signup called');

    var name = document.getElementById('signup-name').value;
    var username = document.getElementById('signup-username').value;
    var email = document.getElementById('signup-email').value;
    var password = document.getElementById('signup-password').value;

    grout.signup().then(function(){
      console.log('successful logout');
      setStatus();
    }, function(err){
      console.error('logout() : Error logging out:', err);
    });
  }
1276522
def send_email(self, register_user):
        
        try:
            from flask_mail import Mail, Message
        except Exception:
            log.error("Install Flask-Mail to use User registration")
            return False
        mail = Mail(self.appbuilder.get_app)
        msg = Message()
        msg.subject = self.email_subject
        url = url_for(
            ".activation",
            _external=True,
            activation_hash=register_user.registration_hash,
        )
        msg.html = self.render_template(
            self.email_template,
            url=url,
            username=register_user.username,
            first_name=register_user.first_name,
            last_name=register_user.last_name,
        )
        msg.recipients = [register_user.email]
        try:
            mail.send(msg)
        except Exception as e:
            log.error("Send email exception: {0}".format(str(e)))
            return False
        return True
878810
def run(self, invite_id, **kwargs):
        
        self.l = self.get_logger(**kwargs)
        self.l.info("Looking up the invite")
        invite = Invite.objects.get(id=invite_id)
        msg_payload = self.compile_msg_payload(invite)
        result = self.send_message(msg_payload)
        self.l.info("Creating task to update invite after send")
        post_send_update_invite.apply_async(args=[invite_id])
        self.l.info("Created task to update invite after send")
        return "Message queued for send. ID: <%s>" % str(result["id"])