Jump to content

session_id()


globi
 Share

Recommended Posts

Hallo!

I'd need to get a unique session id in the ProcessWire, something like the PHP session_id()


Is there s property of a $session object that I could use for that purpose?

If not, what's the workaround you're suggesting?

Please advise.

Best regards,
Mick

Link to comment
Share on other sites

Hello there and welcome to the forum!

Perhaps I'm missing your point, but why not simply use session_id() for this? PW uses PHP sessions under the hood, so this shouldn't be a problem.. of course depending on what you're going to use this information for :)

(You could also grab session ID from $input->cookie->wire, though as far as I'm aware that's essentially the same thing. Note that "wire" is just the default session name set in /site/config.php and if you've changed it to something else you'll have to use that instead.)

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...