Stores user object in session

@param array $attributes
@return mixed
507119
protected function store(array $attributes)
    {
        $identityObject = new AuthenticationIdentity($attributes);
        $this->sessionScope->set('identity', $identityObject);
        $this->sessionScope->set('authenticated', true);

        return $attributes;
    }
446666
protected function _create(array $attributes)
    {
        $model = $this->newModelInstance()->forceFill($attributes);

        $model->save();

        return $model;
    }
47580
public function store($attributes)
    {
        $attributes = $this->formatStoreAttributes($attributes);

        $model = $this->model->create($this->mapAttributesWithScope($attributes));

        if ($this->canOrder()) {
            if ($this->storeInLastPlace) {
                $attr = $this->crudeSetup->getOrderAttribute();
                $model->$attr = $model->id;
                $model->save();
            }
            $this->resetOrder();
        }

        $apiModel = $this->getById($model->id);

        $this->afterStore($apiModel, $attributes);

        return $apiModel;
    }
1226748
public function forceCreate(array $attributes)
    {
        $instance = $this->model->newInstance()->setConnection(
            $this->query->getConnection()->getName()
        );

        return $this->model->unguarded(function () use ($attributes, $instance) {
            return $instance->create($attributes);
        });
    }
1092179
public function attributes($attributes)
    {
        if (is_array($this->attributes) and is_array($attributes)) {
            $attributes = array_merge($this->attributes, $attributes);
        }
        $this->attributes = $attributes;

        return $this;
    }
779555
public function setAttributes(array $attributes = null)
    {
        ValidationUtility::ensureNullOrArrayOfType(
            '$attributes', $attributes, __NAMESPACE__ . '\Pair');

        $this->attributes = $attributes;

        return $this;
    }
653230
public function add(array $attributes = array())
    {
        if (!$this->contains($attributes)) {
            $this->model->getModel()->newInstance($attributes)->save();
            $this->cache->forget($this->cacheKey);
        }
        return $this;
    }
781140
public function update(array $attributes)
    {
        if ($this->related->usesTimestamps()) {
            $attributes[$this->relatedUpdatedAt()] = $this->related->freshTimestamp();
        }

        return $this->query->update($attributes);
    }
307958
public function replicate(array $attributes = [])
    {
        $copy = new static(array_merge($this->toArray(), $attributes));
        $copy->setConstraints(clone $this->getConstraints());
        return $copy;
    }
125083
public function getByAttributes(array $attributes) : ?Model
    {
        if (empty($attributes)) {
            return null;
        }

        // First we will add each credential element to the query as a where clause.
        // Then we can execute the query and, if we found a user, return it in a
        // Eloquent User "model" that will be utilized by the Guard instances.
        $query = $this->getModel()->newQuery();

        foreach ($attributes as $key => $value) {
            $query->where($key, $value);
        }

        return $query->first();
    }
1318864
public function save($attributes = [])
    {
        $attributes = (empty($attributes) || is_null($attributes)) ? $this->getAttributes() : $attributes;

        return $this->_save($attributes);
    }
1086442
public function save($name, $attributes = [])
    {
        if (auth()->guest()) {
            return;
        }
        $params          = [
            'uid'      => auth()->user()->id,
            'brand_id' => brand_id(),
            'resource' => uri(),
            'name'     => snake_case($name),
            'data'     => $attributes,
        ];
        $this->cache->forget($this->cacheKey($params));
        $wid             = $this->getComponentId($name);
        $params['wid']   = $wid;
        $componentParams = ComponentParams::firstOrNew($params);
        $componentParams->save();
        return $componentParams;
    }
947819
public function attributes($attributes = null)
    {
        if (null === $attributes) {
            return $this->attributes;
        }

        $this->attributes = $attributes;

        return $this;
    }
334696
public function store(array $attributes)
    {

        $this->validate($attributes, 'store');

        $filtered = $this->toModelAttributes($this->make([]), $attributes);

        $this->callBeforeListeners('store', [&$attributes]);

        $model = $this->model()->createRoot($filtered);

        $this->callAfterListeners('store', [$model]);

        return $model;

    }
628301
public function computer(array $attributes = [])
    {
        $model = $this->schema->computerModel();

        return (new $model($attributes, $this->query))
            ->setAttribute($this->schema->objectClass(), [
                $this->schema->top(),
                $this->schema->person(),
                $this->schema->organizationalPerson(),
                $this->schema->user(),
                $this->schema->computer(),
            ]);
    }
967188
public function create(array $attributes): bool
    {
        $model = $this->getModel();
        $model->setAttributes($attributes);

        return $model->save();
    }
1327512
public function create(array $attributes)
	{
		$foreign = array(
			$this->getPlainForeignKey() => $this->getParentKey(),
		);

		// Here we will set the raw attributes to avoid hitting the "fill" method so
		// that we do not have to worry about a mass accessor rules blocking sets
		// on the models. Otherwise, some of these attributes will not get set.
		$instance = $this->related->newInstance();

		$instance->setRawAttributes(array_merge($attributes, $foreign));

		$instance->save();

		return $instance;
	}