LLMS_Session::set( string $key, string $value )

Set a session variable


Description Description


Parameters Parameters

$key

(string) (Required)

$value

(string) (Required)


Top ↑

Return Return

(string)


Top ↑

Source Source

File: includes/class.llms.session.php

	public function set( $key, $value ) {

		$key = sanitize_key( $key );

		if ( is_array( $value ) ) {
			$this->session[ $key ] = serialize( $value );
		} else {
			$this->session[ $key ] = $value;
		}

		if ( $this->use_php_sessions ) {

			$_SESSION[ 'llms' . $this->prefix ] = $this->session;
		}

		return $this->session[ $key ];
	}


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.