Jump to content

Protected session data


TSP

Recommended Posts

Posted

I want to retrieve the current login_type for the logged in member on pages with the recently browsing-widget, so I thought I could maybe retrieve it from \IPS\Session::i()->sessionData.

But that array is protected, and I don't see a method that provides access to it either?

So it seems I would have to do an extra query to the sessions-table for the member_id in order for me to retrieve their login_type. Do I really have to add an extra database query to achieve this, or is there some way to retrieve these session values that the system must've already worked out internally for the logged in member anyway? If not, could you maybe add it?

Actually, I found that I can use the method getAnon for this particular session_value, but my question still stands for other values. 

 

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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