Creates a new team member.

@return \Illuminate\Http\RedirectResponse
502531
public function postAddUser()
    {
        try {
            execute(new CreateUserCommand(
                Binput::get('username'),
                Binput::get('password'),
                Binput::get('email'),
                Binput::get('level')
            ));
        } catch (ValidationException $e) {
            return cachet_redirect('dashboard.team.create')
                ->withInput(Binput::except('password'))
                ->withTitle(sprintf('%s %s', trans('dashboard.notifications.whoops'), trans('dashboard.team.add.failure')))
                ->withErrors($e->getMessageBag());
        }

        return cachet_redirect('dashboard.team.create')
            ->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('dashboard.team.add.success')));
    }
256237
public function updateTeamName($name)
    {
        $response = $this->rest->post(
            static::TEAM_PATH,
            array(
                'name' => $name
            )
        );

        $this->checkResponse($response);

        return new Team($response);
    }
568722
public function createProvider()
    {
        if($this->providerInfos->clientId && $this->providerInfos->clientSecret)
        {
            $config = [
                'identifier' => $this->providerInfos->clientId,
                'secret' => $this->providerInfos->clientSecret,
                'callback_uri' => $this->getRedirectUri(),
            ];

            return new \League\OAuth1\Client\Server\Twitter($config);
        }
    }
602341
public function createAction()
  {
    $this->assignTitle("Create Virtual Server");

    /* assign some default property values */
    $this->tpl->defaultServerName = "TeamSpeak ]|[ Server";
    $this->tpl->defaultMaxClients = 32;
    $this->tpl->defaultWelcomeMsg = "[B]Welcome to this TeamSpeak Server, please check [URL]www.teamspeak.com[/URL].[/B]";

    $this->assignLastEvent();
  }
872182
public function actionCreate()
    {
        $model = new AuthItem();

        if ($model->loadAll(request()->post()) && $model->saveAll()) {
            return $this->redirect(['view', 'id' => $model->name]);
        } else {
            return $this->render('create', [
                'model' => $model,
            ]);
        }
    }
825383
public function newAction() {

        $entity = new Role();

        $form = $this->createCreateForm($entity);

        return array(
            'entity' => $entity,
            'form' => $form->createView(),
        );
    }
831447
public function actionCreate()
    {
        $model = new User();

        if ($model->loadAll(request()->post())) {
            $model->setPassword($model->password_hash);
            $model->generateAuthKey();
            if ($model->saveAll()) {
                set_flash('success_create_new_user', $array = [
                    'type'     => 'success',
                    'duration' => 3000,
                    'icon'     => 'glyphicon glyphicon-ok-sign',
                    'title'    => \t('app', 'Congratulations!'),
                    'message'  => \t('app','Your content has been saved'),
                ]);
                return $this->redirect(['update', 'id' => $model->id]);
            } else {
                set_flash('error_user_has_not_been_saved', $array = [
                    'type'     => 'danger',
                    'duration' => 3000,
                    'icon'     => 'glyphicon glyphicon-remove-sign',
                    'title'    => \t('app', 'An error has occurred!'),
                    'message'  => \t('app','Your content has not been saved'),
                ]);
            }
        }

        return $this->render('create', [
            'model' => $model,
        ]);

    }
471623
public function actionCreate()
    {
        $model = new SeoPresets();
        $model->loadDefaultValues();
        if ($model->load(Yii::$app->request->post()) && $model->save()) {
            if(Yii::$app->request->post('action') === 'apply') {
                return $this->redirect(['update', 'id' => $model->id]);
            }else{
                return $this->redirect(['view', 'id' => $model->id]);
            }
        }

        return $this->render('create', [
            'model' => $model,
        ]);
    }
981045
public function actionCreate()
    {
        $model = new AuthItemModel();
        $model->type = $this->type;

        if ($model->load(Yii::$app->request->post()) && $model->save()) {
            Yii::$app->session->setFlash('success', Yii::t('yii2mod.rbac', 'Item has been saved.'));

            return $this->redirect(['view', 'id' => $model->name]);
        }

        return $this->render('create', ['model' => $model]);
    }
524317
public function actionCreate()
    {
        $model = new Account();

        if ($model->load(Yii::$app->request->post()) && $model->save()) {
            return $this->redirect(['view', 'id' => $model->account_id]);
        } else {
            return $this->render('create', [
                'model' => $model,
            ]);
        }
    }
263871
public function actionCreate()
    {
        $model = new Z1User();

        if ($model->load(Yii::$app->request->post()) && $model->save()) {
            Yii::$app->getSession()->setFlash('success', '添加成功');
            return \myzero1\layui\helpers\Tool::redirectParent(['index']);
        } else {
            return $this->render('create', [
                'model' => $model,
            ]);
        }
    }
915319
public function create()
	{
		if ( Shinobi::can( config('watchtower.acl.role.create', false) ) ) {
			return view( config('watchtower.views.roles.create') )
				->with('route', $this->route);
		}

		return view( config('watchtower.views.layouts.unauthorized'), [ 'message' => 'create new roles' ]);
	}
802520
public function actionCreate()
    {
        $model = new Template();

        if ($model->load(Yii::$app->request->post()) && $model->save()) {
            return $this->redirect(['index', 'id' => $model->id]);
        } else {
            return $this->render('create', [
                'model' => $model,
            ]);
        }
    }
257713
public function actionCreate()
    {
        $model = new AuthItem(null);
        $model->type = Item::TYPE_ROLE;
        if (\Yii::$app->request->isAjax && !\Yii::$app->request->isPjax) {
            $model->load(\Yii::$app->request->post());
            \Yii::$app->response->format = Response::FORMAT_JSON;
            return ActiveForm::validate($model);
        }
        if ($model->load(Yii::$app->getRequest()->post()) && $model->save()) {
            return $this->redirect(['view', 'id' => $model->name]);
        } else {
            return $this->render('create', ['model' => $model,]);
        }
    }
1215264
public function createUserAction()
    {
        if(!$this->identity()) {
          return $this->redirect()->toRoute($this->getOptions()->getLoginRedirectRoute());
        }
      
        try {
            $user = new User;
            
            $form = $this->getUserFormHelper()->createUserForm($user, 'CreateUser');
            $request = $this->getRequest();
            if ($request->isPost()) {
                $form->setValidationGroup('username', 'email', 'firstName', 'lastName', 'password', 'passwordVerify', 'language', 'state', 'role', 'question', 'answer', 'csrf');
                $form->setData($request->getPost());
                if ($form->isValid()) {
                    $entityManager = $this->getEntityManager();
                    $user->setEmailConfirmed(false);
                    $user->setRegistrationDate(new \DateTime());
                    $user->setRegistrationToken(md5(uniqid(mt_rand(), true)));
                    $user->setPassword(UserCredentialsService::encryptPassword($user->getPassword()));
                    $entityManager->persist($user);
                    $entityManager->flush();
                    $this->flashMessenger()->addSuccessMessage($this->getTranslatorHelper()->translate('User created Successfully'));
                    return $this->redirect()->toRoute('user-admin');                                        
                }
            }        
        }
        catch (\Exception $e) {
            return $this->getServiceLocator()->get('csnuser_error_view')->createErrorView(
                $this->getTranslatorHelper()->translate('Something went wrong during user creation! Please, try again later.'),
                $e,
                $this->getOptions()->getDisplayExceptions(),
                false
            );
        }
        
        $viewModel = new ViewModel(array('form' => $form));
        $viewModel->setTemplate('csn-user/admin/new-user-form');
        return $viewModel;
    }
273275
public function actionCreate()
    {
        $model = new Role();

        if ($model->load(Yii::$app->request->post()) && $model->save()) {
            return $this->redirect(['view', 'id' => $model->name]);
        } else {
            return $this->render('create', [
                'model' => $model,
            ]);
        }
    }
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;
    }