Signs up a new user with an email and a password.
429111
function onSignUp() {
  var email = $('#signup-email').val();
  var password = $('#signup-password').val();
  auth.createUserWithEmailAndPassword(email, password)
      .then(onAuthUserCredentialSuccess, onAuthError);
}
1028864
def create_user(
            self, username, email, short_name, full_name,
            institute, password=None, **extra_fields):
        
        return self._create_user(
            username=username, email=email,
            short_name=short_name, full_name=full_name,
            institute=institute, password=password,
            is_admin=False, **extra_fields)
359163
def add_registration(self, username, first_name, last_name, email, password=""):
        
        register_user = self.appbuilder.sm.add_register_user(
            username, first_name, last_name, email, password
        )
        if register_user:
            if self.send_email(register_user):
                flash(as_unicode(self.message), "info")
                return register_user
            else:
                flash(as_unicode(self.error_message), "danger")
                self.appbuilder.sm.del_register_user(register_user)
                return None
897180
def sign_in(self, email=None, password=None):
        """"""
        from .pages.sign_in import SignIn
        sign_in = SignIn(self.selenium, self.timeout)
        sign_in.sign_in(email, password)
624915
def login(self, email=None, password=None, remember=False):
        
        from flask_login import login_user
        user = self.first(email=email)
        if user is None:
            events.login_failed_nonexistent_event.send()
            return False

        # check for account being locked
        if user.is_locked():
            raise x.AccountLocked(locked_until=user.locked_until)

        # check for email being confirmed
        is_new = user.email and not user.email_new
        if is_new and not user.email_confirmed and self.require_confirmation:
            raise x.EmailNotConfirmed(email=user.email_secure)

        verified = user.verify_password(password)
        if not verified:
            user.increment_failed_logins()
            self.save(user)
            events.login_failed_event.send(user)
            return False

        # login otherwise
        login_user(user=user, remember=remember)
        user.reset_login_counter()
        self.save(user)
        events.login_event.send(user)

        # notify principal
        app = current_app._get_current_object()
        identity_changed.send(app, identity=Identity(user.id))

        # and return
        return True
1272387
public static function signUp(UserId $anId, UserEmail $anEmail, UserPassword $aPassword, array $userRoles)
    {
        $user = new static($anId, $anEmail, $userRoles, $aPassword);
        $user->confirmationToken = new UserToken();
        $user->publish(
            new UserRegistered(
                $user->id(),
                $user->email(),
                $user->confirmationToken()
            )
        );

        return $user;
    }
1107217
def user_login(self, email=None, password=None):
        
        email = six.moves.input("Email: ") if email is None else email
        password = getpass.getpass() if password is None else password

        login_data = {
            "method": "user.login",
            "params": {"email": email,
                       "pass": password}
        }
        # If the user/password match, the server respond will contain a
        #  session cookie that you can use to authenticate future requests.
        r = self.session.post(
            self.base_api_urls["logic"],
            data=json.dumps(login_data),
        )
        if r.json()["result"] not in ["OK"]:
            raise AuthenticationError("Could not authenticate.\n{}"
                                      .format(r.json()))
74627
def user(context, name, email):
    """"""
    existing_user = context.obj['store'].user(email)
    if existing_user:
        click.echo(existing_user.to_dict())
    elif name:
        new_user = context.obj['store'].add_user(name, email)
        click.echo(click.style(f"New user added: {email} ({new_user.id})", fg='green'))
    else:
        click.echo(click.style('User not found', fg='yellow'))
19591
def create_user(self, username, password, name, email):
        """"""
        method = 'POST'
        endpoint = '/rest/v1/users/{}'.format(self.client.sauce_username)
        body = json.dumps({'username': username, 'password': password,
                           'name': name, 'email': email, })
        return self.client.request(method, endpoint, body)
567770
def pre_create(sender, model):
    

    if isinstance(model, Model) and not model.password:
        model.password = random_str()
1189873
protected void populateUser (
        User user, Username name, Password pass, String realname, String email, int siteId)
    {
        user.username = name.getUsername();
        user.setPassword(pass);
        user.setRealName(realname);
        user.setEmail(email);
        user.created = new Date(System.currentTimeMillis());
        user.setSiteId(siteId);
    }
1136335
def _create_user(ctx):
    """"""

    username, passhash = _get_credentials(ctx.obj['username'],
                                          ctx.obj['password'],
                                          ctx.obj['db'])

    if ctx.obj['db'].objectmodels['user'].count({'name': username}) > 0:
        raise KeyError()

    new_user = ctx.obj['db'].objectmodels['user']({
        'uuid': str(uuid4()),
        'created': std_now()
    })

    new_user.name = username
    new_user.passhash = passhash

    return new_user
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
693017
public static Observable<BackendUser> signInInBackground(String email, String password){
        return getAM().loginASync(new LoginCredentials(email, password));
    }
889752
def create_user(cls, username, password, name, email):
        """"""
        config = Config()
        payload = {"username": username,
                   "email": email,
                   "name": name,
                   "password": password, }
        user_creation_resp = requests.post("https://users.{}/users/".format(config.host),
                                           json=payload)
        if user_creation_resp.status_code != 201:
            raise errors.ResourceError("couldnt create user")
25097
def add_register_user(
        self, username, first_name, last_name, email, password="", hashed_password=""
    ):
        
        register_user = self.registeruser_model()
        register_user.username = username
        register_user.email = email
        register_user.first_name = first_name
        register_user.last_name = last_name
        if hashed_password:
            register_user.password = hashed_password
        else:
            register_user.password = generate_password_hash(password)
        register_user.registration_hash = str(uuid.uuid1())
        try:
            self.get_session.add(register_user)
            self.get_session.commit()
            return register_user
        except Exception as e:
            log.error(c.LOGMSG_ERR_SEC_ADD_REGISTER_USER.format(str(e)))
            self.appbuilder.get_session.rollback()
            return None
608219
def sign_in(user=create(:user))
      visit new_user_session_path

      within("#new_user") do
        fill_in 'user_email', with: user.email
        fill_in 'user_password', with: user.password
      end

      click_button 'Log in'
    end