Viewing of signup details and editing of password
965422
def profile(request):
    '''
        
    '''
    context = {}

    if request.method == 'POST':
        form = PasswordChangeForm(request.user, request.POST)
        if form.is_valid():
            form.save()
            messages.info(request, 'Password Changed.')
    else:
        form = PasswordChangeForm(request.user)

    key = Key.objects.get(email=request.user.email)
    
    #analytics
    endpoint_q = key.reports.values('api__name', 'endpoint').annotate(calls=Sum('calls')).order_by('-calls')
    endpoints = [{'endpoint':'.'.join((d['api__name'], d['endpoint'])),
                  'calls': d['calls']} for d in endpoint_q]
    date_q = key.reports.values('date').annotate(calls=Sum('calls')).order_by('date')
    context['endpoints'], context['endpoint_calls'] = _dictlist_to_lists(endpoints, 'endpoint', 'calls')
    context['timeline'] = date_q

    context['form'] = form
    context['key'] = key
    context['password_is_key'] = request.user.check_password(key.key)
    return render_to_response('locksmith/profile.html', context,
                              context_instance=RequestContext(request))
510477
def p_changeinfo(self):
        '''
        
        '''

        post_data, def_dic = self.fetch_post_data()

        usercheck = MUser.check_user(self.userinfo.uid, post_data['rawpass'])
        if usercheck == 1:
            MUser.update_info(self.userinfo.uid, post_data['user_email'], extinfo=def_dic)
            output = {'changeinfo ': usercheck}
        else:
            output = {'changeinfo ': 0}
        return json.dump(output, self)
237480
function showUserIsTypingView(isTyping, userId, dialogId) {
    if (isMessageForCurrentDialog(userId, dialogId)) {

        if (!isTyping) {
            $('#' + userId + '_typing').remove();
        } else if (userId != currentUser.id) {
            var userLogin = getUserLoginById(userId);
            var typingUserHtml = buildTypingUserHtml(userId, userLogin);
            $('#messages-list').append(typingUserHtml);
        }

        // scroll to bottom
        var mydiv = $('#messages-list');
        mydiv.scrollTop(mydiv.prop('scrollHeight'));
    }
}
1182496
def sign_in(self, email, password):
        """"""
        self.email = email
        self.login_password = password
        if self.is_element_present(*self._next_button_locator):
            self.wait.until(expected.visibility_of_element_located(
                self._next_button_locator))
            self.click_next()
        self.click_sign_in()
56512
def initialize(self, id=None, text=None):
        self.id = none_or(id, int)
        

        self.text = none_or(text, str)
        """
        Username or IP address of the user at the time of the edit : str | None
        """
219434
def get_account_details(self, account):
        
        _form = mechanize.HTMLForm(self.SEARCH_MEMBERS_URL, method="POST")
        _form.new_control('text', 'username', {'value': account})
        _form.new_control('text', '_', {'value': ''})

        try:
            r = self.post_url(self.SEARCH_MEMBERS_URL, form=_form)
        except AuthRequiredException:
            self._auth()
            r = self.post_url(self.SEARCH_MEMBERS_URL, form=_form)

        if r:
            # single quoted json parameters are not valid so convert
            # them into double quoted parameters
            _decoded = json.loads(r.replace("'", '"'))
            # we have a double array result so retrieve only what's
            # essential
            if _decoded[0]:
                return _decoded[0][0]

        raise InvalidAccountException
701087
def invite(self, event):
        """"""

        self.log('Inviting new user to enrol')
        name = event.data['name']
        email = event.data['email']
        method = event.data['method']

        self._invite(name, method, email, event.client.uuid, event)
39196
def forgotten_pw(new_user=False):
    """"""
    email = request.form.get("email", "").lower()

    action = request.form.get("action")
    if action == "cancel":
        return redirect(url_for("login.login_form"))

    if not email:
        flash(_("You must provide your email address."), "error")
        return render_template("login/forgotten_password.html")

    try:
        user = User.query.filter(
            sql.func.lower(User.email) == email, User.can_login == True
        ).one()
    except NoResultFound:
        flash(
            _("Sorry, we couldn't find an account for " "email '{email}'.").format(
                email=email
            ),
            "error",
        )
        return render_template("login/forgotten_password.html"), 401

    if user.can_login and not user.password:
        user.set_password(random_password())
        db.session.commit()

    send_reset_password_instructions(user)
    flash(
        _("Password reset instructions have been sent to your email address."), "info"
    )

    return redirect(url_for("login.login_form"))
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)
1221724
def update_info(self, _action=None, **kwargs):
        

        def cb():
            kwargs.pop("email", None)
            kwargs.pop("username", None)
            kwargs.pop("password_hash", None)
            kwargs.pop("require_password_change", None)
            self.user.update(**kwargs)
            return kwargs

        _action = ACTIONS["UPDATE"] if _action is None else _action
        return signals.user_update(self, _action, cb, data=self.to_dict())
824388
function drawAddGuest() {
    $(ADDGUEST).show();

    function submit() {
        var name =  $(ADDGUESTFRM+"> input")[0].value;
        if (!NAMERE.test(name)) {
            if(name) {
                alert("Your input text is too long!");
            }
            return false;
        }
        $.cookie("player", name);
        main();
    }
    $(ADDGUESTFRM+"> button").click(submit);
    $(ADDGUESTFRM+"> input:visible").focus();
    $(ADDGUESTFRM+"> input").keydown(function(event) {
        if (event.keyCode === 13) {
            submit();
        }
    });
}
428049
def clean(self):
        ''''''
        data = super(PasswordForm, self).clean()
        if 'new_password' in data:
            if data['new_password'] != data.get('confirm_password', None):
                raise ValidationError(_('Passwords do not match.'))
            if data.get('confirm_password', None) == \
                    data.get('current_password', None):
                raise ValidationError(_('Old password and new password '
                                        'must be different'))
        return data
988193
def show(config, username):
        """"""
        client = Client()
        client.prepare_connection()
        user_api = API(client)
        CLI.show_user(user_api.show(username))
1231715
def entries_view(self, request, form_id):
        
        if request.POST.get("back"):
            change_url = admin_url(Form, "change", form_id)
            return HttpResponseRedirect(change_url)
        form = get_object_or_404(Form, id=form_id)
        entries_form = EntriesForm(form, request, request.POST or None)
        delete_entries_perm = "%s.delete_formentry" % FormEntry._meta.app_label
        can_delete_entries = request.user.has_perm(delete_entries_perm)
        submitted = entries_form.is_valid()
        if submitted:
            if request.POST.get("export"):
                response = HttpResponse(content_type="text/csv")
                timestamp = slugify(datetime.now().ctime())
                fname = "%s-%s.csv" % (form.slug, timestamp)
                header = "attachment; filename=%s" % fname
                response["Content-Disposition"] = header
                queue = StringIO()
                delimiter = settings.FORMS_CSV_DELIMITER
                try:
                    csv = writer(queue, delimiter=delimiter)
                    writerow = csv.writerow
                except TypeError:
                    queue = BytesIO()
                    delimiter = bytes(delimiter, encoding="utf-8")
                    csv = writer(queue, delimiter=delimiter)
                    writerow = lambda row: csv.writerow([c.encode("utf-8")
                        if hasattr(c, "encode") else c for c in row])
                writerow(entries_form.columns())
                for row in entries_form.rows(csv=True):
                    writerow(row)
                data = queue.getvalue()
                response.write(data)
                return response
            elif request.POST.get("delete") and can_delete_entries:
                selected = request.POST.getlist("selected")
                if selected:
                    entries = FormEntry.objects.filter(id__in=selected)
                    count = entries.count()
                    if count > 0:
                        entries.delete()
                        message = ungettext("1 entry deleted",
                                            "%(count)s entries deleted", count)
                        info(request, message % {"count": count})
        template = "admin/forms/entries.html"
        context = {"title": _("View Entries"), "entries_form": entries_form,
                   "opts": self.model._meta, "original": form,
                   "can_delete_entries": can_delete_entries,
                   "submitted": submitted}
        return render(request, template, context)
1346308
protected function formPasswordInfo()
	{
		$form = new XmlFormCollection($this->_context, $this->_url, $this->_myWords->Value("CHANGEPASSTITLE"));
		$this->_paragraph->addXmlnukeObject($form);
		
		$hidden = new XmlInputHidden("action", "changepassword");
		$form->addXmlnukeObject($hidden);
		
		$textbox = new XmlInputTextBox($this->_myWords->Value("CHANGEPASSOLDPASS"), "oldpassword","");
		$textbox->setInputTextBoxType(InputTextBoxType::PASSWORD );
		$form->addXmlnukeObject($textbox);
		
		$textbox = new XmlInputTextBox($this->_myWords->Value("CHANGEPASSNEWPASS"), "newpassword","");
		$textbox->setInputTextBoxType(InputTextBoxType::PASSWORD );
		$form->addXmlnukeObject($textbox);
		
		$textbox = new XmlInputTextBox($this->_myWords->Value("CHANGEPASSNEWPASS2"), "newpassword2","");
		$textbox->setInputTextBoxType(InputTextBoxType::PASSWORD );
		$form->addXmlnukeObject($textbox);
		
		$button = new XmlInputButtons();
		$button->addSubmit($this->_myWords->Value("TXT_CHANGE"),"");
		$form->addXmlnukeObject($button);
	}
597415
def inspect(self):
        
        last_attempt = self.get_last_failed_access_attempt(
            ip_address=self.ip,
            captcha_enabled=True,
            captcha_passed=False,
            is_expired=False
        )

        if last_attempt is None and not self.request.user.is_authenticated():
            # create a new entry
            user_access = self._FailedAccessAttemptModel(
                ip_address=self.ip,
                username=self.username,
                captcha_enabled=True,
                captcha_passed=False,
                is_expired=False
            )
        elif last_attempt:
            user_access = last_attempt

        if self.request.method == 'POST':

            if not self.request.user.is_authenticated():

                user_access.user_agent = self.request.META.get('HTTP_USER_AGENT', '<unknown user agent>')[:255]
                user_access.username = self.username
                user_access.failed_attempts += 1
                user_access.params_get = self.request.GET
                user_access.params_post = self.request.POST

                if user_access.failed_attempts >= self.max_failed_attempts:
                    user_access.is_locked = True
                user_access.save()

            elif self.request.user.is_authenticated() and last_attempt:
                last_attempt.is_expired = True
                last_attempt.save()
376740
public function applyDetailSettings()
    {
        $commUtil = $this->util->getCommTemplateUtil();

        $staffTemplates = $commUtil->getCommTemplatesForTarget('staffPassword', null, true);

        $this->applyBrowseSettings();

        $this->set('gor_welcome',                   'label', $this->_('Greeting'),
                'description', $this->_('For emails and token forward screen.'), 'elementClass', 'Textarea', 'rows', 5);
        $this->set('gor_signature',                 'label', $this->_('Signature'),
                'description', $this->_('For emails and token forward screen.'), 'elementClass', 'Textarea', 'rows', 5);
        $this->set('gor_create_account_template',   'label', $this->_('Create Account template'),
                'default', $commUtil->getCommTemplateForCode('accountCreate', 'staffPassword'),
                'multiOptions', $staffTemplates);
        $this->set('gor_reset_pass_template',       'label', $this->_('Reset Password template'),
                'default', $commUtil->getCommTemplateForCode('passwordReset', 'staffPassword'),
                'multiOptions', $staffTemplates);

        $this->setIfExists('gor_allowed_ip_ranges', 'label', $this->_('Allowed IP Ranges'),
            'description', $this->_('Separate with | examples: 10.0.0.0-10.0.0.255, 10.10.*.*, 10.10.151.1 or 10.10.151.1/25')
            );

        if ($this->project->multiLocale) {
            $this->set('gor_name', 'description', 'ENGLISH please! Use translation file to translate.');
            $this->set('gor_url',  'description', 'ENGLISH link preferred. Use translation file to translate.');
        }

        return $this;
    }