Creates a first admin user account.

<p>
This can be run by anyone, but only to create the very first user account.
166743
@RequirePOST
    public void doCreateFirstAccount(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException {
        if(hasSomeUser()) {
            rsp.sendError(SC_UNAUTHORIZED,"First user was already created");
            return;
        }
        User u = createAccount(req, rsp, false, "firstUser.jelly");
        if (u!=null) {
            tryToMakeAdmin(u);
            loginAndTakeBack(req, rsp, u);
        }
    }
1221322
@Nonnull
  public static StubObject createForUser (@Nullable final String sUserID,
                                          @Nullable final Map <String, String> aCustomAttrs)
  {
    return new StubObject (GlobalIDFactory.getNewPersistentStringID (), sUserID, aCustomAttrs);
  }
1306709
@Beta
  public GoogleCredential createDelegated(String user) {
    if (serviceAccountPrivateKey == null) {
      return this;
    }
    return toBuilder()
        .setServiceAccountUser(user)
        .build();
  }
740535
def create_user(self, name, password, is_super=False):
        
        statement = ddl.CreateUser(
            name=name, password=password, is_super=is_super
        )
        self._execute(statement)
1231395
public Principal createUser(final SecurityContext securityContext, final PropertyKey credentialKey, final String credentialValue, final Map<String, Object> propertySet, final String confKey) {

		return createUser(securityContext, credentialKey, credentialValue, propertySet, false, confKey);

	}
1072538
protected function createFirstUser()
    {
        $info = [
            'first_name' => $this->askForFirstName(),
            'last_name'  => $this->askForLastName(),
            'email'      => $this->askForEmail(),
            'password'   => $this->askForPassword(),
            'created_at' => Carbon::now(),
            'updated_at' => Carbon::now(),
        ];

        $this->application->make('Modules\User\Repositories\UserRepository')->createWithRoles(
            $info,
            $this->getAdminRole()
        );

        $this->command->info('Admin account created!');
    }
216078
private function createAdminUser()
    {
        $user = factory(User::class)->create(
            [
            'firstName' => $this->ADMIN_FIRST_NAME,
            'lastName' => $this->ADMIN_LAST_NAME,
            'slug' => str_slug($this->ADMIN_FIRST_NAME.'-'.$this->ADMIN_LAST_NAME),
            'email' => $this->ADMIN_EMAIL,
            'password' => Hash::make($this->ADMIN_PASSWORD),
            'isActive' => true
            ]
        );

        // assign role
        $user->assignRoles(UserGroup::getAdminGroup()->groupID, true);
    }
583939
def create_admin(ctx):
    """"""

    try:
        admin = _create_user(ctx)
        admin.roles.append('admin')

        admin.save()
        log("Done")
    except KeyError:
        log('User already exists', lvl=warn)
25244
def create_user(ctx):
    """"""

    try:
        new_user = _create_user(ctx)

        new_user.save()
        log("Done")
    except KeyError:
        log('User already exists', lvl=warn)
957542
public function createAdmin($username, $password, $email)
    {
        return $this->createAccount($username, $password, $email, [], 'ACCOUNT_ADMIN', Admin::class);
    }
300609
@Nonnull
  public static StubObject createForUser (@Nullable final String sUserID)
  {
    return new StubObject (GlobalIDFactory.getNewPersistentStringID (), sUserID, null);
  }
1238310
public User createAccount(String userName, String password) throws IOException {
        User user = User.getById(userName, true);
        user.addProperty(Details.fromPlainPassword(password));
        SecurityListener.fireUserCreated(user.getId());
        return user;
    }
176853
def create_user
      @admin = Admin.new(administrator_params)
      @admin.access_level = 'admin'
      @admin.overlord = 'Y'
      
      respond_to do |format|
        if @admin.save
          Setting.save_data({setup_complete: 'Y'})
          clear_cache
          session[:setup_complete] = true
          format.html { redirect_to admin_path, notice: I18n.t("controllers.admin.setup.general.success") }
        else
          format.html { render action: "administrator" }
        end
      end

    end
984463
public void createUser(User user, String password){
        ProtocolHeader header = new ProtocolHeader();
        header.setType(ProtocolType.CreateUser);
        byte[] secret = null;
        if(password != null && ! password.isEmpty()){
            secret = ObfuscatUtil.base64Encode(password.getBytes());
        }
        CreateUserProtocol p = new CreateUserProtocol(user, secret);

        connection.submitRequest(header, p, null);
    }
1327236
public void addUser(PrincipalUser user) {
        SystemAssert.requireArgument(user != null, "Null user can not be added.");
        users.add(user);
    }
1312991
def make_admin(user):
    '''
    
    '''
    tutor_group, owner_group = _get_user_groups()
    user.is_staff = True
    user.is_superuser = True
    user.save()
    owner_group.user_set.add(user)
    owner_group.save()
    tutor_group.user_set.add(user)
    tutor_group.save()
912229
public function create()
    {
        /**
         * @var AdminUserInterface $adminUser
         */
        $classNamespace = $this->getEntityNamespace();
        $adminUser = new $classNamespace();
        $adminUser
            ->setGender(ElcodiUserProperties::GENDER_UNKNOWN)
            ->setToken($this->generator->generate(2))
            ->setEnabled(true)
            ->setCreatedAt($this->now());

        return $adminUser;
    }