14

If for some reason you need to use sessions, you can change the session time with a config variable http://ellislab.com/expressionengine/user-guide/general/hidden_configuration_variables.html#cp-session-ttl $config['cp_session_ttl'] = 86400; // Keep admins logged in for one day!


10

Try changing the Control Panel Session type to Cookies Only: http://ellislab.com/expressionengine/user-guide/cp/admin/security_settings.html


9

I think this should be the solution, http://api.jquery.com/unload/ After this code executes, the alert will be displayed whenever the browser leaves the current page. It is not possible to cancel the unload event with .preventDefault(). This event is available so that scripts can perform cleanup when the user leaves the page. $(window).unload(...


8

This probably isn't the answer your looking for, but your mention of Singapore and then reading the conversation thread at Ellis Lab, my first thought was you're hitting some internet restriction, either by the ISP, but more likely by the country. In Singapore the government via the Media Development Authority (MDA) bans, blocks, and otherwise monitors ...


7

There is Show Once. It does use cookies, but other than that it is probably just what you are looking for. From the add-on page: Show Once is the module for ExpressionEngine 2 that allows showing certain content to a user only once (during their first visit). The content that you want to show needs to be wrapped in {exp:show_once:check} tag pair. {...


7

$this->EE is referring to the EE singleton object that basically powers everything in EE. You need to reference the global object from memory. $this->EE =& get_instance(); If this doesn't work, then be sure you are executing your code within the EE bootstrap (within a module, plugin, extension, library, or some other approved place).


6

Session Variables is a great little plugin and we've used it without any issue. Easy to setup and does what you need.


6

I discovered the problem. We were using CartThrob's fingerprinting for sessions with the configuration set to "0" for the default fingerprinting method. The default method creates the fingerprint as: $fingerprint = $this->EE->input->server('HTTP_ACCEPT_LANGUAGE').$this->EE->input->server('HTTP_ACCEPT_CHARSET').$this->EE->input->...


5

Try this to see if it works for you. I just tested, and it works just fine for me. $this->EE->session->userdata('signature') To see all the values in the session values stored as userdata, just do the following: var_dump($this->EE->session->userdata); exit();


5

It's pretty easy to save user-scoped data in Stash; by default this will expire at the end of the user's session. You could save just the entry ids or the whole entry. {exp:stash:append_list name="wishlist" save="yes" replace="yes"} {stash:entry_id}67{/stash:entry_id} {/exp:stash:append_list}


5

This is a bit of a vague question but it appears that IE does send different UA strings when compatibility mode is enabled and EE (or rather CodeIgniter) does invalidate sessions by default if the user agent changes. I've never tried this but by the look of it you can change this behaviour by editing this setting in system/expressionengine/config/session.php:...


5

There is no native way to store session information, but there is an add-on, Session Variables, which does exactly what you're looking for.


5

I would try a 3rd party favorites/bookmark addon like Remember Me. Then you would need to dump that info into a form to send off in an email or print.


5

Change the Control Panel Session Type to "Cookies only". Control Panel Location: Admin ‣ Security and Privacy ‣ Security and Sessions Only cookies are used to track the admin user. When this setting is used a “remember me” checkbox will appear next to the Control Panel login page, enabling users to stay permanently logged in.


4

This is a bad idea - explain to your client that it's against the principles of HTTP. For example, a customer opens different pages of your site in two tabs/windows. The close the second one, and go back to the first tab, but not it's logged out and any link/page submit is going to cause an error. That would piss me right off. Secondly, Andy's solution is ...


4

ExpressionEngine natively processes forms in secure mode which means each for submission is tied to an automatically generated XID / Hash which is passed as a hidden field in all CP and most front-end forms. The XID is a hash containing a reference to a database entry which gives EE a bunch of info about the user (their user agent, timestamp created, ip ...


3

This has now been solved thanks to @Justin Kimbrell. I have just placed the original code I was developing inside an ExpressionEngine template and updated its php preferences. Doing so places the code within the bootstrap as suggested above, and still allows for the template to be call via a URL. In the template I am simply just using the same code as above ...


3

Yes, it's possible (assuming you're talking about triggering the ExpressionEngine status message in the control panel, not generically setting flash data from an AJAX request). I had this same question a few days ago - I know for example the CP template manager triggers the success message at the top of the page from an AJAX request, so I went trawling ...


3

Another solution would be to use First-timer. It allows you to redirect a user to a certain page when they login for the first time.


3

It is possible, but the mechanism for generating session IDs changed for EE 2.6, so if you want to retain compatibility with 2.5 and under (as I did) you need to add in a quick version_compare check. Here's the snippet that I'm using with Missing Link. $sess_type = $this->EE->config->item('admin_session_type'); $session_id = ($sess_type == 'c') ? '...


3

Use Stash - Here's how: {!-- ============================================ STORE A LIST OF RELATED ARTICLES INTO A LIST ================================================== --} {!-- first the manually chosen ones --} {exp:stash:set_list name="rels" parse_tags="yes" trim="yes"} {exp:channel:entries channel="article"} {related_articles} ...


3

This is an old bug that caused a lot people problems. You can read the lengthy bug report here: https://support.ellislab.com/bugs/detail/17423 Bottom line: you'll need to update to the latest version of EE


3

You can query the exp_sessions table, where you can see both the ip_address and member_id for each session. Multiple sessions from wildly different IPs would be a cue that an account was being shared widely.


3

After a few weeks of attempting to track down this bug, we finally found the culprit was misconfigured cookie_domain setting. In our config file, we dynamically set the cookie domain so cookies work with our various MSM sites: $config['cookie_domain'] = '.' . preg_replace('#^www\.(.+\.)#i', '$1', $_SERVER['HTTP_HOST']); During our server switch,...


3

The answer to this lay in the Varnish configuration. Basically, in the vcl_recv function, I created my logic for whether to "lookup" (check the cache, fetch from the backend if the cache is empty), or "pass" (always serve from the backend). Then in vcl_pass, I added an HTTP header to the request indicating "this request was passed and should never be cached"...


2

I'd prefer to just up vote MediaGirl's comment, but since I don't have enought rep yet to do that I'll just say that we did the two things recommended here: 1) switch to cookies only and 2) up the cp_session_ttl and that seems to have worked best for us. Probably didn't need to set both, but it worked regardless.


2

I use the following code within the config.php file that is located at /system/expressionengine/config/config.php. And you have to set "cookies" in your security preferences. // Cookie Settings $config['cookie_prefix'] = ""; $config['cookie_domain'] = '.yourdomain.com'; $config['admin_session_type'] = 'c'; // if c does not work try 's' (session) // logout ...


2

There has been known issues with the ExpressionEngine "Remember Me" functionality since August of 2011. It currently is not fixed. Here is the bug report: https://support.ellislab.com/bugs/detail/16355


2

In additional to Dom Stubbs suggestion if you change to using Cookies only does that help? go to: Admin > Security & Privacy > Security & Session Preferences and then change the User Session Type.


2

Like MJR suggest, set a javascript timer to about the same length as the logout / session-expiration timer. Then redirect after timeout. The elegant part: Around 20 or 30 secs before expiration, popup a dialog that the session is about to expire. (maybe redirect to a page where the user is going to be logged out, to prevent redirecting without the session ...


Only top voted, non community-wiki answers of a minimum length are eligible