Sets the user identifier.

@param  string                    $identifier User identifier
@throws \InvalidArgumentException
766440
public function setIdentifier(string $identifier): void
	{
		if(!in_array($identifier, ['email', 'username', 'id']))
		{
			throw new InvalidArgumentException(vsprintf('Invalid identifier [ %s ].', [$identifier]));
		}

		$this->identifier = $identifier;
	}
253805
public function setOutcomeIdentifier($outcomeIdentifier)
    {
        if (Format::isIdentifier($outcomeIdentifier)) {
            $this->outcomeIdentifier = $outcomeIdentifier;
        } else {
            $msg = "'${outcomeIdentifier}' is not a valid QTI Identifier.";
            throw new InvalidArgumentException($msg);
        }
    }
171042
public function setID($identity)
    {
        $idAttribute = $this->idAttribute;
        return (is_string($idAttribute) && !empty($idAttribute)) ? $this->$idAttribute = $identity : null;
    }
1027991
public function setParam($identifier, $value)
    {
        $this->params[$this->resolveParamName($identifier)] = $value;

        return $this;
    }
330150
public function assignIdentifier($object, array $identifier) : void
    {
        if (! $object instanceof IdentifiableInterface) {
            throw new InvalidArgumentException(sprintf('%s must implement IdentifiableInterface.', get_class($object)));
        }

        $object->assignIdentifier($identifier);
    }
1044219
public function setResponseIdentifier($responseIdentifier)
    {
        if (Format::isIdentifier($responseIdentifier, false) === true) {
            $this->responseIdentifier = $responseIdentifier;
        } else {
            $msg = "The 'responseIdentifier' argument must be a valid QTI identifier.";
            throw new InvalidArgumentException($msg);
        }
    }
973895
public function set($identifier, $value)
    {
        $this->internalSet($this->configsContainer, $identifier, $value);

        return $this;
    }
485824
public function setIdentifier($identifier) {

		if(false === is_array($identifier)) {
			$identifier = [$identifier];
		}

		$this -> identifier = $identifier;
	}
757998
public function setIdentifier($identifier)
    {
        if ($this->identifier && $this->identifier !== $identifier) {
            throw new MappingException('Cannot map the identifier to more than one property');
        }

        $this->identifier = $identifier;
    }
310898
public function alias($identifier, $alias)
    {
        $alias      = trim((string) $alias);
        $identifier = (string) $identifier;

        //Don't register the alias if it's the same as the identifier
        if($alias != $identifier) {
            $this->_aliases[$alias] = (string) $identifier;
        }

        return $this;
    }
143437
public function setIdent($ident)
    {
        if ($ident === null) {
            $this->ident = null;
            return $this;
        }

        if (!is_string($ident)) {
            throw new InvalidArgumentException(
                sprintf(
                    '[%s] Identifier must be a string; received %s',
                    get_called_class(),
                    (is_object($ident) ? get_class($ident) : gettype($ident))
                )
            );
        }

        $this->ident = $ident;

        return $this;
    }
1265787
public void setIdentifier(int identifier)
                    throws ObjectManagerException
    {
        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.entry(this,
                        cclass,
                        "setIdentifier",
                        new Object[] { new Integer(identifier) });

        // We can only set this once. 
        if (objectStoreIdentifier != IDENTIFIER_NOT_SET) {
            InvalidConditionException invalidConditionException = new InvalidConditionException(this
                                                                                                , "objectStoreIdentifier"
                                                                                                , Integer.toString(objectStoreIdentifier) + "not equal IDENTIFIER_NOT_SET"
                            );
            ObjectManager.ffdc.processException(this,
                                                cclass,
                                                "setIdentifier",
                                                invalidConditionException,
                                                "1:623:1.31",
                                                new Object[] { new Integer(objectStoreIdentifier) });
            if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
                trace.exit(this, cclass
                           , "setIdentifier"
                           , invalidConditionException
                                );
            throw invalidConditionException;
        } // if (objectStoreIdentifier != IDENTIFIER_NOT_SET).
        objectStoreIdentifier = identifier;

        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.exit(this, cclass
                       , "setIdentifier"
                            );
    }
1346658
public function setOutcomeIdentifier($outcomeIdentifier)
    {
        if (Format::isIdentifier($outcomeIdentifier, false) === true) {
            $this->outcomeIdentifier = $outcomeIdentifier;
        } else {
            $msg = "The 'outcomeIdentifier' argument must be a valid QTI identifier, '" . $outcomeIdentifier . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }
129996
public function setUserTemplate($identifier) {
		$template = PermamailTemplate::get_by_identifier($identifier);
		if(!$template) {
			$template = PermamailTemplate::create(array(
				'Identifier' => $identifier,
			));
			$template->write();
		}
		
		$this->userTemplate = $identifier;

		return $this;
	}
1181079
public function setIdentifier(string $identifier) : self
    {
        // Sanitize Identifier => remove space and slashes
        $this->identifier = strtr(
            ucwords(strtr(
                $identifier,
                ['_' => ' ', '/' => '-', '.' => '_ ', '\\' => '_ ']
            )),
            [' ' => '']
        );

        return $this;
    }
267983
def set_id(self, identifier):
        
        self._id = identifier
        refobj = self.get_refobj()
        if refobj:
            self.get_refobjinter().set_id(refobj, identifier)
964221
public function setResourceIdentifier($resourceIdentifier)
    {
        if (is_string($resourceIdentifier) === false) {
            $msg = "The resourceIdentifier argument must be a string.";
            throw new InvalidArgumentException($msg);
        } elseif ($resourceIdentifier === '') {
            $msg = "The resourceIdentifier argument must be a non-empty string.";
            throw new InvalidArgumentException($msg);
        } else {
            $this->resourceIdentifier = $resourceIdentifier;
        }
    }