Creation of a built-in account
497048
@RequestMapping(value = "create", method = RequestMethod.POST)
    public Account create(@RequestBody @Valid AccountInput input) {
        return accountService.create(input);
    }
214761
def cloneaccount(ctx, account_name, account):
    
    from bitsharesbase import transactions, operations

    account = Account(account)
    op = {
        "fee": {"amount": 0, "asset_id": "1.3.0"},
        "registrar": account["id"],
        "referrer": account["id"],
        "referrer_percent": 100,
        "name": account_name,
        "owner": account["owner"],
        "active": account["active"],
        "options": account["options"],
        "extensions": {},
        "prefix": ctx.bitshares.rpc.chain_params["prefix"],
    }
    op = operations.Account_create(**op)
    print_tx(ctx.bitshares.finalizeOp(op, account, "active"))
1261258
def account_setup(remote, token, resp):
    
    gh = github3.login(token=resp['access_token'])
    with db.session.begin_nested():
        me = gh.me()

        token.remote_account.extra_data = {'login': me.login, 'id': me.id}

        # Create user <-> external id link.
        oauth_link_external_id(
            token.remote_account.user, dict(
                id=str(me.id),
                method='github')
        )
1116549
function updateAccount() {

  account.middleName = 'Make it so.';

  return account.save(function(err, savedAccount) {
    if (err) throw err;
    account = savedAccount;
    console.log('Updated account:');
    console.log(account);
    return authenticateAccount(); //next quickstart step
  });

}
924310
def create(self,params=None, headers=None):
        
        path = '/creditor_bank_accounts'
        
        if params is not None:
            params = {self._envelope_key(): params}

        try:
          response = self._perform_request('POST', path, params, headers,
                                            retry_failures=True)
        except errors.IdempotentCreationConflictError as err:
          return self.get(identity=err.conflicting_resource_id,
                          params=params,
                          headers=headers)
        return self._resource_for(response)
382385
def account_post_init(remote, token=None):
    """"""
    gh = GitHubAPI(user_id=token.remote_account.user_id)
    repos = [r.id for r in gh.api.repositories() if r.permissions['admin']]
    sync_hooks.delay(token.remote_account.user_id, repos)
113504
def create_account(self, **kwargs):
        
        response = self.__requester.request(
            'POST',
            'accounts',
            _kwargs=combine_kwargs(**kwargs)
        )
        return Account(self.__requester, response.json())
725710
public function account()
    {
        if (!$this->_step('database')) {
            $this->redirect(['plugin' => 'Installer', 'controller' => 'startup', 'action' => 'database']);
        }

        $this->loadModel('User.Users');
        $user = $this->Users->newEntity();

        if ($this->request->data()) {
            $data = $this->request->data;
            $data['roles'] = ['_ids' => [1]];
            $user = $this->Users->newEntity($data);

            if ($this->Users->save($user)) {
                $this->Flash->success(__d('installer', 'Account created you can now login!'));
                $this->_step();
                $this->redirect(['plugin' => 'Installer', 'controller' => 'startup', 'action' => 'finish']);
            } else {
                $this->Flash->danger(__d('installer', 'Account could not be created, please check your information.'));
            }
        }

        $this->title(__d('installer', 'Create New Account'));
        $this->set('user', $user);
    }
72217
def _makeStoreOwnerPerson(self):
        
        if self.store is None:
            return None
        userInfo = self.store.findFirst(signup.UserInfo)
        name = u''
        if userInfo is not None:
            name = userInfo.realName
        account = self.store.findUnique(LoginAccount,
                                        LoginAccount.avatars == self.store, None)
        ownerPerson = self.createPerson(name)
        if account is not None:
            for method in (self.store.query(
                    LoginMethod,
                    attributes.AND(LoginMethod.account == account,
                                   LoginMethod.internal == False))):
                self.createContactItem(
                    EmailContactType(self.store),
                    ownerPerson, dict(
                        email=method.localpart + u'@' + method.domain))
        return ownerPerson
181305
def create(
        cls, api_key=None, idempotency_key=None, stripe_account=None, **params
    ):
        """"""
        url = cls.class_url()
        headers = populate_headers(idempotency_key)
        return make_request(
            cls, 'post', url, stripe_account=stripe_account,
            headers=headers, params=params)
480019
def put(self, name=None, user_ids=None):
        
        return self.connection.put('account', data=dict(name=name, user_ids=user_ids))
778804
public function create()
    {
        $request = $this->initApiRequest($this->account->getSignUpApiToken());
        $request->setPath(ApiRequest::PATH_SIGN_UP);
        $request->setReplaceParams(array('{lang}' => $this->account->getLanguageCode()));
        $response = $request->post($this->account);
        $this->checkResponse($request, $response);

        $account = new Account($this->account->getPlatform() . '-' . $this->account->getName());
        $account->setTokens(Token::parseTokens(
            $response->getJsonResult(true),
            '',
            '_token'
        ));
        return $account;
    }
1112401
def create_user(name,
                username,
                email,
                password,
                token_manager=None,
                app_url=defaults.APP_URL):
    
    headers = token_manager.get_access_token_headers()
    auth_url = environment.get_auth_url(app_url=app_url)
    url = "%s/api/v1/accounts" % auth_url

    payload = {
        'name': name,
        'username': username,
        'email': email,
        'password': password
    }

    response = requests.post(url,
                             data=json.dumps(payload),
                             headers=headers)

    if response.status_code == 201:
        return response.json()

    else:
        raise JutException('Error %s: %s' % (response.status_code, response.text))
760181
def create_user(email, password, active, confirmed_at, send_email):
    
    if confirmed_at == 'now':
        confirmed_at = security.datetime_factory()
    user = user_manager.create(email=email, password=password, active=active,
                               confirmed_at=confirmed_at)
    if click.confirm(f'Are you sure you want to create {user!r}?'):
        security_service.register_user(user, allow_login=False, send_email=send_email)
        user_manager.save(user, commit=True)
        click.echo(f'Successfully created {user!r}')
    else:
        click.echo('Cancelled.')
677217
def cli(obj, name, email, password, status, text):
    """"""
    client = obj['client']
    if not email:
        raise click.UsageError('Need "--email" to sign-up new user.')
    if not password:
        raise click.UsageError('Need "--password" to sign-up new user.')
    try:
        r = client.signup(name=name, email=email, password=password, status=status, attributes=None, text=text)
    except Exception as e:
        click.echo('ERROR: {}'.format(e))
        sys.exit(1)
    if 'token' in r:
        click.echo('Signed Up.')
    else:
        raise AuthError
1291261
def _get_or_create_uaa(self, uaa):
        
        if isinstance(uaa, predix.admin.uaa.UserAccountAuthentication):
            return uaa

        logging.debug("Initializing a new UAA")
        return predix.admin.uaa.UserAccountAuthentication()
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)