Store a user object in the provider

@param string $identifier A unique user identifier, (i.e a username or email address)
@param array $data An associative array of user data
@return KUserInterface     Returns a UserInterface object
335770
public function store($identifier, $data)
    {
        // Find the user id
        if (!is_numeric($identifier))
        {
            if(!$identifier = JUserHelper::getUserId($identifier)) {
                $identifier = 0;
            }
        }

        return parent::store($identifier, $data);
    }
1162114
public function retrieveByToken($identifier, $token)
    {
        $user = $this->getGenericUser(
            $this->conn->table($this->table)->find($identifier)
        );

        return $user && $user->getRememberToken() && hash_equals($user->getRememberToken(), $token)
                    ? $user : null;
    }
719497
public static function getAddonHavingComponentWithIdentifier(string $identifier)
    {
        $addons = self::getAddons();
        foreach ($addons as $addon) {
            foreach ($addon->getComponents() as $component) {
                if (empty($component->getIdentifier())) {
                    continue;
                }
                
                if ($component->getIdentifier() == $identifier) {
                    return $addon;
                }
            }
        }
        
        return null;
    }
1125855
public function retrieveByToken($identifier, $token)
    {
        $user = $this->createModel()->first(
            ['_id' => $identifier, 'remember_token' => $token]
        );

        return $user;
    }
747919
protected function updateByIdentifier($identifier, $data)
	{
		return $this->aggregate[IdentifierServiceProvider::getProviderKey()]->update($identifier->getEntity(), $data);
	}
1144993
public function tryGetByIdentifier(Identifier $identifier)
    {
        $mapId     = $identifier->getSerialized();
        $className = $identifier->class->getName();

        if (!isset($this->identityMap[$className][$mapId])) {
            return false;
        }

        return $this->identityMap[$className][$mapId];
    }
182882
public static function setConfig($identifier, array $config)
    {
        $objIdentifier = self::getIdentifier($identifier);
        $strIdentifier = (string) $objIdentifier;

        if (isset(self::$_configs[$strIdentifier])) {
            self::$_configs[$strIdentifier] = self::$_configs[$strIdentifier]->append($config);
        } else {
            self::$_configs[$strIdentifier] = new AnConfig($config);
        }
    }
1316183
public function getClient($identifier)
    {
        if ($identifier !== PgArray::getSubType($identifier)) {
            return parent::getClient('array');
        } else {
            return parent::getClient($identifier);
        }
    }
1102050
public function set($identifier, $data = null)
    {
        if($data == null) {
            $data = is_string($identifier) ? new KObjectIdentifier($identifier) : $identifier;
        }

        $this->offsetSet((string) $identifier, $data);
        return $data;
    }
857348
public function retrieveByID($identifier)
    {
        $user = $this->conn->{$this->table}->findOne(array('_id' => new \MongoId($identifier)));

        if ( ! is_null($user))
        {
            return new MongolUser((array) $user);
        }
    }
649904
protected function quoteIdentifier($identifier)
    {
        if (!is_array($identifier)) {
            return $this->connection->quoteIdentifier($identifier);
        }

        foreach ($identifier as &$value) {
            $value = $this->connection->quoteIdentifier($value);
            unset($value);
        }

        return $identifier;
    }
473696
public function findByIdentifier($identifier)
    {
        $object = $this->persistenceManager->getObjectByIdentifier($identifier, $this->entityClassName);
        if ($object === null) {
            foreach ($this->addedResources as $addedResource) {
                if ($this->persistenceManager->getIdentifierByObject($addedResource) === $identifier) {
                    $object = $addedResource;
                    break;
                }
            }
        }

        return $object;
    }
814878
public function getResource($identifier)
    {
        /** @var UserEntity $user */
        $user = $this->userManager->findUserByUsername($identifier);
        if (!$user) {
            throw new NotFoundHttpException(
                $this->translator->trans('error.user_not_found', array('%id%' => $identifier))
            );
        }

        return $this->createResourceFromUser($user);
    }
94644
public function retrieveById($identifier)
    {
        $model = $this->createModel();

        return $this->newModelQuery($model)
                    ->where($model->getAuthIdentifierName(), $identifier)
                    ->first();
    }
841247
public function retrieveByToken($identifier, $token)
    {
        $user = $this->conn->table($this->table)
            ->where('id', $identifier)
            ->where('remember_token', $token)
            ->first();

        if (! is_null($user)) {
            return new GenericUser((array) $user);
        }
    }
1330137
public function getUserByProviderId($provider, $identifier)
    {
        $this->oDb->select('user_id');
        $this->oDb->where('provider', $provider);
        $this->oDb->where('identifier', $identifier);

        $oUser = $this->oDb->get(NAILS_DB_PREFIX . 'user_social')->row();

        if (empty($oUser)) {
            return false;
        }

        return $this->oUserModel->getById($oUser->user_id);
    }
1098257
private function setObject(array $data)
    {
        $identifierAttribute = $this->configuration->getIdentifierAttribute();

        if ($identifierAttribute === null) {
            throw new UndefinedIdentifierAttribute();
        }

        // We found an identifier attribute, $data is a json object
        if (isset($data[$identifierAttribute]) === true) {
            return $this->setObjectForObjectData($identifierAttribute, $data);
        }

        // We don't found an identifier attribute, $data is a collection
        return $this->setObjectForCollectionData($data);
    }