Sends the reset password instructions email for the specified user.

        Sends signal `reset_password_instructions_sent`.

        :param user: The user to send the instructions to.
423937
def send_reset_password_instructions(self, user):
        
        token = self.security_utils_service.generate_reset_password_token(user)
        reset_link = url_for('security_controller.reset_password',
                             token=token, _external=True)
        self.send_mail(
            _('flask_unchained.bundles.security:email_subject.reset_password_instructions'),
            to=user.email,
            template='security/email/reset_password_instructions.html',
            user=user,
            reset_link=reset_link)
        reset_password_instructions_sent.send(app._get_current_object(),
                                              user=user, token=token)
400170
def send_login_signal(self, request, user, profile, client):
        
        signals.login.send(sender=profile.__class__, user=user,
            profile=profile, client=client, request=request)
1180122
async def SetPassword(self, changes):
        '''
        
        '''
        # map input types to rpc msg
        _params = dict()
        msg = dict(type='UserManager',
                   request='SetPassword',
                   version=1,
                   params=_params)
        _params['changes'] = changes
        reply = await self.rpc(msg)
        return reply
1115896
def create_password_reset(cls, email, valid_for=3600) -> str:
        
        user = cls.where_email(email)
        if user is None:
            return None
        PasswordResetModel.delete_where_user_id(user.id)
        token = JWT().create_token({
            'code': Security.random_string(5),  # make unique
            'user_id': user.id},
            token_valid_for=valid_for)
        code = Security.generate_uuid(1) + "-" + Security.random_string(5)
        password_reset_model = PasswordResetModel()
        password_reset_model.token = token
        password_reset_model.code = code
        password_reset_model.user_id = user.id
        password_reset_model.save()
        return code
649287
def request_password_reset(self, user, base_url):
        
        user.generate_password_link()
        db.session.add(user)
        db.session.commit()
        events.password_change_requested_event.send(user)
        self.send_password_change_message(user, base_url)
542687
def send_email(sender, msg, driver):
    
    driver.users().messages().send(
        userId=sender,
        body=msg
    ).execute()
153794
public function sendUserResetEMail(\Gems_User_User $user)
    {
        $subjectTemplate = $this->_('Password reset requested');

        // Multi line strings did not come through correctly in poEdit
        $bbBodyTemplate = $this->_("Dear {greeting},\n\n\nA new password was requested for your [b]{organization}[/b] account on the [b]{project}[/b] site, please click within {reset_in_hours} hours on [url={reset_url}]this link[/url] to enter the password of your choice.\n\n\n{organization_signature}\n\n[url={reset_url}]{reset_url}[/url]\n"); // */
        //$bbBodyTemplate  = $this->_("To set a new password for the [b]{organization}[/b] site [b]{project}[/b], please click on this link:\n{reset_url}");

        return $user->sendMail($subjectTemplate, $bbBodyTemplate, true);
    }
162033
def capture_reset_password_requests(reset_password_sent_at=None):
    
    reset_requests = []

    def _on(app, **data):
        reset_requests.append(data)

    reset_password_instructions_sent.connect(_on)

    try:
        yield reset_requests
    finally:
        reset_password_instructions_sent.disconnect(_on)
1302240
def user(self, user):
        
        if user is None:
            raise ValueError("Invalid value for `user`, must not be `None`")
        if user is not None and len(user) > 1024:
            raise ValueError("Invalid value for `user`, length must be less than or equal to `1024`")

        self._user = user
462056
def send_activation(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.activation_subject, self.activation_body, sender, **kwargs
        ).send()
821211
public function sendReset(UserInterface $user)
    {
        $view = Config::get('cpanel::views.email_password_forgot');
        $code = $user->getResetPasswordCode();

        Mail::queue($view, compact('code'), function($message) use ($user)
        {
            $message->to($user->email)->subject('Account Password Reset');
        });
    }
1188094
def reset_password user, password
      Oath.config.password_reset_service.new(user, password).perform
    end
129983
def send_login_instructions(user):
    
    token = generate_login_token(user)
    login_link = url_for_security('token_login', token=token, _external=True)

    _security.send_mail(config_value('EMAIL_SUBJECT_PASSWORDLESS'), user.email,
                        'login_instructions', user=user, login_link=login_link)

    login_instructions_sent.send(app._get_current_object(), user=user,
                                 login_token=token)
665988
def update_password_from_form(self, user=None, form=None):
        
        user = user or self.current
        if not form and "form" in current_context.data and request.method == "POST":
            form = current_context.data.form
        elif not form:
            raise OptionMissingError("Missing a form in 'update_user_password' action")

        self._update_password_from_form(user, form)
        save_model(user)
        self.update_user_password_signal.send(self, user=user)
125655
def set_password(sender, **kwargs):
    
    if sender.model_class.__name__ == 'User':
        usr = kwargs['object']
        if not usr.password.startswith('$pbkdf2'):
            usr.set_password(usr.password)
            usr.save()
399664
def send_activation_email(self, request, queryset):
        
        n = 0
        for user in queryset:
            if not user.is_active and settings.USERS_VERIFY_EMAIL:
                send_activation_email(user=user, request=request)
                n += 1

        self.message_user(
            request, _('Activation emails sent to %(count)d %(items)s.') %
            {'count': n, 'items': model_ngettext(self.opts, n)},  messages.SUCCESS)
861311
def send_reset_password_link(request):
    '''
    
    '''
    if not registration_settings.RESET_PASSWORD_VERIFICATION_ENABLED:
        raise Http404()
    serializer = SendResetPasswordLinkSerializer(data=request.data)
    serializer.is_valid(raise_exception=True)
    login = serializer.validated_data['login']

    user = None
    for login_field in get_login_fields():
        user = get_user_by_lookup_dict(
            {login_field: login}, default=None, require_verified=False)
        if user:
            break

    if not user:
        raise UserNotFound()

    signer = ResetPasswordSigner({
        'user_id': user.pk,
    }, request=request)

    template_config = (
        registration_settings.RESET_PASSWORD_VERIFICATION_EMAIL_TEMPLATES)
    send_verification_notification(user, signer, template_config)

    return get_ok_response('Reset link sent')