Creates a new user and account. Returns the newly created user.
189671
def save(self):
        
        username, email, password = (self.cleaned_data['username'],
                                     self.cleaned_data['email'],
                                     self.cleaned_data['password1'])

        new_user = UserenaSignup.objects.create_user(username,
                                                     email,
                                                     password,
                                                     not userena_settings.USERENA_ACTIVATION_REQUIRED,
                                                     userena_settings.USERENA_ACTIVATION_REQUIRED)
        return new_user
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)
507660
def create
      @user = Incline::User.new(user_params :before_create)

      if system_admin? # skip recaptcha check if an admin is currently logged in.
        @user.recaptcha = :verified
      end

      if @user.valid?
        if @user.save
          @user.send_activation_email request.remote_ip
          if system_admin?
            flash[:info] = "The user #{@user} has been created, but will need to activate their account before use."
            additional_params = user_params :after_create
            if additional_params.any?
              unless @user.update_attributes(additional_params)
                flash[:warning] = 'Failed to apply additional attributes to new user account.'
              end
            end
            if inline_request?
              render 'show', formats: [ :json ]
            else
              redirect_to users_url
            end
            return
          else
            flash[:safe_info] = 'Your account has been created, but needs to be activated before you can use it.<br>Please check your email to activate your account.'
            if inline_request?
              render 'show', formats: [ :json ]
            else
              redirect_to main_app.root_url
            end
            return
          end
        else
          @user.errors[:base] << 'Failed to create user account.'
        end
      end
      render 'new'
    end
407373
def create
      user = Lines::User.find_by(email: params[:email])
      if user && user.authenticate(params[:password])
        session[:user_id] = user.id
        redirect_to admin_root_url
      else
        flash.now[:error] = t('lines.login_error')
        render "new"
      end
    end
618976
def create_account(cls, params):
        
        user_params = dictset(params).subset(
            ['username', 'email', 'password'])
        try:
            return cls.get_or_create(
                email=user_params['email'],
                defaults=user_params)
        except JHTTPBadRequest:
            raise JHTTPBadRequest('Failed to create account.')
2229
def _create_user(
            self, username, email, short_name, full_name,
            institute, password, is_admin, **extra_fields):
        

        # Create Person
        person = self.model(
            username=username, email=email,
            short_name=short_name, full_name=full_name,
            is_admin=is_admin,
            institute=institute,
            **extra_fields
        )
        person.set_password(password)
        person.save()
        return person
113504
def create_account(self, **kwargs):
        
        response = self.__requester.request(
            'POST',
            'accounts',
            _kwargs=combine_kwargs(**kwargs)
        )
        return Account(self.__requester, response.json())
904576
def created_by(self):
        
        if self.api and self.created_by_id:
            return self.api._get_user(self.created_by_id)
607425
def create_user(self, username, password):
        
        user_id = "org.couchdb.user:" + username
        res = self["_users"].resource.put(
            user_id, body=json.dumps({
                "_id": user_id,
                "name": username,
                "roles": [],
                "type": "user",
                "password": password,
                "farms": []
            })
        )
        if res[0] == 409:
            raise RuntimeError(
                'The username "{}" is already taken'.format(username)
            )
        elif res[0] != 201:
            raise RuntimeError(
                "Failed to create user ({}): {}".format(
                    res.status_code, res.content
                )
            )
610111
def _AddUser(self, user):
    
    self.logger.info('Creating a new user account for %s.', user)

    command = self.useradd_cmd.format(user=user)
    try:
      subprocess.check_call(command.split(' '))
    except subprocess.CalledProcessError as e:
      self.logger.warning('Could not create user %s. %s.', user, str(e))
      return False
    else:
      self.logger.info('Created user account %s.', user)
      return True
740535
def create_user(self, name, password, is_super=False):
        
        statement = ddl.CreateUser(
            name=name, password=password, is_super=is_super
        )
        self._execute(statement)
1080749
def create_user(self, name, password):
        """"""
        hashed_password = self._password_hasher(password)
        return dict(name=name, password=hashed_password)
575054
def create_for_user(self, user):
        
        # support passing email address too
        if type(user) is unicode:
            from .profile import Profile as User
            user = User.objects.get(email=user)

        temp_key = token_generator.make_token(user)

        # save it to the password reset model
        password_reset = PasswordReset(user=user, temp_key=temp_key)
        password_reset.save()

        # send the password reset email
        subject = _("Password reset email sent")
        message = render_to_string("profiles/email_messages/password_reset_key_message.txt", {
            "user": user,
            "uid": int_to_base36(user.id),
            "temp_key": temp_key,
            "site_url": settings.SITE_URL,
            "site_name": settings.SITE_NAME
        })
        send_mail(subject, message, settings.DEFAULT_FROM_EMAIL, [user.email])

        return password_reset
1369210
def create_user(self, claims):
        """"""
        email = claims.get('email')
        username = self.get_username(claims)
        return self.UserModel.objects.create_user(username, email)
1329944
def create_user(server_context, email, container_path=None, send_email=False):
    
    url = server_context.build_url(security_controller, 'createNewUser.api', container_path)
    payload = {
        'email': email,
        'sendEmail': send_email
    }

    return server_context.make_request(url, payload)
225003
async def create(self, **kwargs):
        '''  '''
        return await super(EntryResource, self).create(user=self.request['user'])
566949
function create(user, callback) {
      var cb = callback || angular.noop;

      return User.create(user,
        function (user) {
          return cb(user);
        },
        function (err) {
          return cb(err);
        }).$promise;
    }