Set user data

@param string $variable
@param mixed $value
172320
public function set($variable, $value = null)
    {
        if (is_array($variable)) {
            $this->userData = array_merge($this->userData, $variable);
        } else if (is_object($variable)) {
            $this->userData = array_merge($this->userData, (array)$variable);
        } else {
            if ($value === null) {
                unset($this->userData[$variable]);
            } else {
                $this->userData[$variable] = $value;
            }
        }
    }
747901
public static function set($var, $value) {
        //  	var_dump($var." ".$value);
        Session::init(true);
        if (!Session::check_checksum()) return false;
        $_SESSION[$var] = $value;
        $_SESSION[__SESSION_checksum_var] = Session::make_checksum();
        return $value;
    }
61019
final public function set($varname, $value = NULL, $namespace = 'default')
    {
        //stores a value to a varname in a namespace of this session
        $session = $this;

        if (!isset($namespace) || empty($namespace)) {
            //@TODO Throw an exception, we need a name or use the default;
            throw new Exception("Cannot set new Session variable to unknown '{$namespace}' namespace");
            return false;
        }


        //If we don't have a registry to that namespace;
        if (!isset($session->registry[$namespace])) {
            //Create it;
            $registry = new Registry($namespace);
            $session->registry[$namespace] = $registry;
        }

        //echo $namespace;
        //@TODO, check if the regitry is not locked before adding
        if (!$session->isLocked($namespace)) {
            $registry = $session->getNamespace($namespace);
            $registry->set($varname, $value);
        }
        //If auth is locked

        return $session;
    }
1143065
public function setName($value)
    {
        $this->_validateNotNull('Name', $value);
        $this->_validateString('Name', $value);

        if ($this->data['name'] === $value) {
            return;
        }

        $this->data['name'] = $value;

        $this->_setModified('name');
    }
941849
public function setUserValue(string $value) : FormElement
    {
        if (is_array($value)) {
            $value = implode(',', $value);
        }
        parent::setUserValue($value);
        return $this;
    }
1100851
public function setCookie($variable, $value)
    {
        if (!empty($value)) {
            $this->cookieParams[$variable] = $value;
            return;
        }

        unset($this->cookieParams[$variable]);
    }
523640
public function setActive(int $value) : User
    {

        if ($this->data['active'] !== $value) {
            $this->data['active'] = $value;
            $this->setModified('active');
        }

        return $this;
    }
338512
function set_value($name,$value){
		LogMaster::log("change value of: ".$name." as: ".$value);
		$this->data[$name]=$value;
	}
436438
public function setGlobalVariable($variable = NULL, $value = NULL)
	{
		try {

			$result = FALSE;

			if (is_null($variable))
				throw new Exception("Global variable name not provided or is null", 503);

			if (is_null($value))
				throw new Exception("Global variable value not provided or is null", 503);

			$uri = "/asterisk/variable";
			$postData = array("variable" => $variable, "value" => $value);

			$this->ariEndpointOptions['json'] = $postData;
			$result = json_decode($this->ariEndpointClient->post($this->ariEndpointURL . $uri, $this->ariEndpointOptions)->getBody()->getContents());

			return $result;

		} catch (\GuzzleHttp\Exception\RequestException $e) {
			$this->phpariObject->lasterror = $e->getMessage();
			$this->phpariObject->lasttrace = $e->getTraceAsString();
			return (int)$e->getCode();
		} catch (\GuzzleHttp\Exception\ClientException $e) {
			$this->phpariObject->lasterror = $e->getMessage();
			$this->phpariObject->lasttrace = $e->getTraceAsString();
			return (int)$e->getCode();
		} catch (\GuzzleHttp\Exception\ServerException $e) {
			$this->phpariObject->lasterror = $e->getMessage();
			$this->phpariObject->lasttrace = $e->getTraceAsString();
			return (int)$e->getCode();
		} catch (Exception $e) {
			$this->phpariObject->lasterror = $e->getMessage();
			$this->phpariObject->lasttrace = $e->getTraceAsString();

			return FALSE;
		}
	}
695153
def set_uservar(self, user, name, value):
        
        self._session.set(user, {name: value})
1032832
public function set($key, $value) {
        header('' . $key . ': ' . $value . '', true);
        $this->vars[$key] = $value;
    }
189221
public function setGlobalVar($variable, $value = null)
    {
        $uri = 'asterisk/variable';

        try {
            $this->client->getEndpoint()->post($uri, [
                'form_params' => [
                    'variable' => $variable,
                    'value' => $value
                ]
            ]);
        } catch (RequestException $e) {
            $this->processRequestException($e);
        }
    }
14933
private function setUserData($property, $value)
    {
        $auth = $this->authFactory->newInstance();
        $userData = $auth->getUserData();
        if(!$userData) {
            return;
        }
        $userData[$property] = $value;
        $auth->setUserData($userData);
    }
282209
protected function setData($name, $value = null)
    {
        if (is_array($name)) {
            $this->data = array_merge($this->data, $name);
        }
        elseif (is_string($name)) {
            $this->data[$name] = $value;
        }

        return $this;
    }
675004
protected function setUser($user_id)
    {
        $this->data_user = array();

        if (is_numeric($user_id)) {

            $this->data_user = $this->user->get($user_id);

            if (empty($this->data_user)) {
                $this->outputHttpStatus(404);
            }
        }
    }
208802
public function setValue($key, $value) {
        $this->startSession();
        $_SESSION [$key] = $value;
        $this->sessionData = null;
        session_write_close();
    }
371121
public function setUserSetting(string $identifier, string $value): void
    {
        $this->userSettingService->setUserSetting($identifier, $value);
    }