Get a new instance of the User
@param $data
@return $this
7448
public function instance($data)
    {
        $RagnarokUser = new SecUser();
        $this->userRagnarok = $RagnarokUser->populate($data);
        return $this->userRagnarok;
    }
760197
protected function createUserInstance($data)
    {
        $config = app('scaffold.config');

        if (!$model = $this->fetchModel($config)) {
            throw new Exception('Could not find a model to create user.');
        }

        try {
            $model::unguard();

            return (new $model())->create($this->dataWithId($data));
        } catch (Exception $e) {
            return (new $model())->create($data);
        }
    }
304311
protected function create(array $data)
    {
        $user = UserModel::create($data);
        return User::find($user->id);
    }
298166
public function create(array $data = array())
    {
        if (!isset($data["configPathPrefix"])) {
            $data["configPathPrefix"] = $this->configPathPrefix;
        }
        return $this->_objectManager->create($this->_instanceName, $data);
    }
559434
public static function get_instance( $request_data ) {

		// If the single instance hasn't been set, set it now.
		if ( isset( self::$instance ) ) {
			self::$instance->data = $request_data;
		} else {
			self::$instance       = new self;
			self::$instance->data = $request_data;
			self::$instance->auto_load();
		}

		return self::$instance;

	}
589374
public function create($data)
    {
        $descriptor = new UsesDescriptor($data->getName());
        $descriptor->setDescription($data->getDescription());
        $reference = $data->getReference();

        $descriptor->setReference($reference);

        return $descriptor;
    }
831561
public function newInstance($data = [], $isUpdate = false, $where = null)
    {
        return (new static($data))->isUpdate($isUpdate, $where);
    }
522404
public function createNew($data)
    {
        if ($data instanceof File) {
            /* @var $data File */

            $media = new Media();
            if (method_exists($media, 'getClientOriginalName')) {
                $media->setName($data->getClientOriginalName());
            } else {
                $media->setName($data->getFilename());
            }
            $media->setContent($data);

            return $media;
        }
    }
1150030
public function createNew($data)
    {
        foreach ($this->handlers as $handler) {
            $result = $handler->createNew($data);
            if ($result) {
                return $result;
            }
        }

        return null;
    }
512657
public function getNew($data = [])
    {
        $pk = $this->getPrimaryKey();
        if (is_string($pk) && isset($data[$pk]) && $this->getRegistry()->has($data[$pk])) {
            $return = $this->getRegistry()->get($data[$pk]);
            $return->writeData($data);
            $return->writeDBData($data);

            return $return;
        }

        $record = $this->getNewRecordFromDB($data);

        return $record;
    }
118635
public function create($data)
    {
        $data = $this->retrieveData($data);
        $insertData = [
            'user_id' => $this->getUserId(),
            'role_id' => $data['role_id'],
        ];
        $this->table->insert($insertData);
        return $data;
    }
58455
public function createOrUpdateUser($data)
    {
        if (! isset($data['login']) && isset($data['email'])) {
            $data['login'] = $data['email'];
        } elseif (! isset($data['email']) && isset($data['login'])) {
            $data['email'] = $data['login'];
        }

        if (isset($data['principal-id']) && $data['principal-id']) {
            return $this->updateUser($data);
        } else {
            return $this->createUser($data);
        }
    }
62874
public function repopulate(SimpleInput $data = null)
	{
		if ( is_null($data) )
		{
			$data = new SimpleInput;
		}

		$this->populate($data->input());

		return $this;
	}
99271
protected function createNewInstance(array $data): object
    {
        $instance = self::getInstantiator()->instantiate($this->getEntityClass());

        $refl = $this->getReflection();

        foreach ($data as $key => $value) {
            $prop = $refl->getProperty($key);
            $prop->setAccessible(true);

            if ($value instanceof Closure) {
                $value = $value($instance, $this, $this->manager);
            }

            $prop->setValue($instance, $value);
        }

        return $instance;
    }
296675
public function populate($data)
    {
        $this->userId = $data->userId;
        $this->email = $data->email;
        $this->firstName = $data->firstName;
        $this->lastName = $data->lastName;
        $this->status = $data->status;
        $this->remember_token = $data->remember_token;
        $this->userSessionId = $data->userSessionId;
        $this->sessionCode = $data->sessionCode;
        $this->ipAddress = $data->ipAddress;
        $this->environment = $data->environment;
        return $this;
    }
713211
protected function create(array $data)
    {
        $user = UserGate::create([
            'first_name' => $data[ 'first_name' ],
            'last_name'  => $data[ 'last_name' ],
            'username'   => $data[ 'username' ],
            'email'      => $data[ 'email' ],
            'password'   => bcrypt($data[ 'password' ]),
            'enabled'    => 1,
        ]);

        if ($user) {
            $user->attachRole(2);
        }

        return $user;
    }
760055
public function createUser(array $data) : User
    {
        $data['password'] = Hash::make($data['password']);
        return $this->create($data);
    }