Hot answers tagged

12

If you already have the auto_login field in your login form and it's just not working, you are probably running into a long standing bug where Remember Me just doesn't work consistently or correctly. Here are two possibly related bug reports: http://expressionengine.com/bug_tracker/bug/16355 http://expressionengine.com/bug_tracker/bug/17423


11

Clearing cookies should get around it. You might want to look at your cookie settings in the CP and try switching cookies/session authentication. I was having the same problem with an MSM site. I changed my CP session type to "Sessions and Cookies" and all now seems well.


9

Add a checkbox with the name auto_login to your login form <input class="checkbox" type="checkbox" name="auto_login" value="1" /> Auto-login on future visits


8

Ok, this was solved by using a combination of the replies from @mediagirl and @andiefairlie, neither were quite there but they led me to the solution. NOTE: I didn't state in the question that I am using https://github.com/focuslabllc/ee-master-config for this set up. The issue was that the login was setting the cookies' domain to the original site (a ...


8

I know this is marked answered for 8 months, but here is an answer without any add-ons needed, which is in the original question. Set template access for guests to off. Have it load a login template instead. In the login template do this for the login form: {exp:member:login_form return="{segment_1}/{segment_2}/{segment_3}"} What I like about this ...


7

I think this has to do with secure forms being enabled. I've noticed that sometimes when I hit the CP my browser will load a cached version of the page. The problem though is the hidden XID form field will have an expired value so submitting the form causes the POST to be invalid and the page refreshes requiring a second login attempt.


7

Typically I've found this to be caused by logging into the same site in multiple environments. For example - widgetsite.com, dev.widgetsite.com, and widgetsite.dev. The cause seems to be ExpressionEngine getting confused by the cookies from one version of the site when accessing another. I've only found two solutions to the problem. The first is to clear ...


7

I keep my site in online mode, but have the templates restricted to logged in members. When a non-logged in member visits the site they are redirected to a "splash" template with a login form. Once logged in they can see and do everything. You can set this up in template preferences - It should be just ejnough to redirect the homepage as no-one else should ...


7

My first suggestion is to clear browser Cookies and Cache. The second step is to add the following into your config.php file: $config['cookie_domain'] = ""; $config['cookie_path'] = ""; $config['cookie_prefix'] = ""; $config['admin_session_type'] = "s"; $config['user_session_type'] = "c"; $config['require_ip_for_login'] = "n"; $config['...


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

UPDATE: As you're using FreeMember you can take advantage of its built-in PREVIOUS_URL constant: {exp:freemember:login return="PREVIOUS_URL"} As detailed in the FreeMember login form docs on GitHub. If you were using the built in login_form tag instead, I'd suggest you use something like the Current URL extension (EE2 version linked) use the incredibly ...


6

Yes. Go to Admin -> Security and Privacy -> Security and Sessions and if you're using Sessions for the CP session type then you can select "no" for Allow Multiple Log-ins From a Single Account.


6

It might be easier for you to leave the site online. You can emulate offline functionality by doing this: Create an alternate main index template named something like "home." Create a special "Coming soon" page for your main index template. Create a snippet with these contents:{if logged_out}{redirect="/"}{/if} Add the snippet to all of your pages (except ...


6

Found it. Turned out to be a setting left over in config.php. When the original site was constructed, I was using one of those temporary URLs that hosting companies often provide for viewing sites before domains are pointed at them. The original setting for the temporary URL was still in the config.php setting for 'cp_url'. Apparently, changing the ...


6

Try adding the following and change the cookie prefix: $config['cookie_domain'] = ""; $config['cookie_path'] = ""; $config['cookie_prefix'] = ""; $config['admin_session_type'] = "s"; $config['user_session_type'] = "c"; $config['require_ip_for_login'] = "n"; $config['require_ip_for_posting'] = "n"; $config['secure_forms'] = "n";


6

Big thanks to Joel Bradbury for solving this one. I needed to add $config['disable_csrf_protection'] = 'y'; to my config. Here's why: It'll be because the tokens have been generated on a different base domain, and then it's moved and gotten stuck. Normally they're regenerated when they're detected as expired, but if it see's them as not expired, but ...


6

Some more googling and I found the answer here. The issue is with Structure and setting it to redirect to structure on login. I finally found out that Structure 3.3.1 is the culprit when you set it to redirect to Structure on login. You can get past it by editing the config file and change $config['allow_extensions'] = 'y'; to $config['...


5

The dynamic IP issue was fixed in EE 2.5.0 I believe - but I recently ran into this issue due to the server having an incorrect time set, causing sessions to immediately expire after they were created. The fix was to have my host set the correct server time.


5

Try adding this to your config.php file: $config['cookie_domain'] = ""; $config['cookie_path'] = ""; $config['cookie_prefix'] = ""; $config['admin_session_type'] = "s"; $config['user_session_type'] = "c"; $config['require_ip_for_login'] = "n"; $config['require_ip_for_posting'] = "n"; $config['secure_forms'] = "n";


5

My first suggestion is to clear browser Cookies and Cache. The second step is to add the following into your config.php file: $config['cookie_domain'] = ""; $config['cookie_path'] = ""; $config['cookie_prefix'] = ""; $config['admin_session_type'] = "s"; $config['user_session_type'] = "c"; $config['require_ip_for_login'] = "n"; $config['...


5

Try adding the following at the end of your configs in the config.php file: $conf['secure_forms'] = "n"; $conf['cookie_domain'] = ""; $conf['cookie_path'] = ""; $conf['cookie_prefix'] = ""; $conf['admin_session_type'] = "cs"; $conf['require_ip_for_login'] = "n"; $conf['require_ip_for_posting'] = "n"; MOST LIKELY THE ISSUE IS THIS LINE: $conf['...


5

Here's how I'm doing this using Profile:Edit, which is an add-on. I assume Zoo Visitor will support something similar. If you visit one of my news article pages, because it was linked in an email, at the top of that template I have: {if logged_out}{redirect='/members/login/{segment_1}/{segment_2}'}{/if} You could add all your segments there. The point is, ...


5

I would suggest building a simple API module within the EE installation. You've found the Auth library which should do exactly what you need, it's just a matter of exposing it, because there really isn't an easy way to take EE's authentication scheme out of EE. So once you create a module, it'd simply be a matter of setting up an action ID within the ...


4

If you have your cookie domain set to something other than the actual domain of the site in your config then this can happen, and some security settings can also cause this too. You could try adding the following lines to config.php file in order to get into the control panel and then debug further from there: $config['require_ip_for_login'] = 'n'; $...


4

It's normal that EE restricts logins based on IP address. Restricting on user agent wouldn't be much use, because a malicious script could just change the user agent for every request. That said, the normal EE error message is You are only permitted to make four login attempts every 1 minute(s). You must have increased this from 1 minute to 30 minutes, ...


4

Might seem like a silly question, but are you sure you're looking at the correct database for the site? For example, do you have a development site/database/configuration file? Cookie/Session problems will normally just bounce you to the homepage or back to the login screen. This sounds more like an actual problem authenticating the username/password which ...


4

Try adding these lines on the bottom of your expressionengine/config/config.php file: $config['cookie_prefix'] = ''; $config['cookie_path'] = ''; $config['cookie_domain'] = ''; $config['user_session_type'] = 'c'; $config['admin_session_type'] = 's';


4

Silly me, I hadn't copyied up my new version of the themes folder. Hopefully this will be of help to someone else with a short-term memory!


4

Use the Structure global variable {structure:page:uri} which is the same as EE's native "page_url" variable.


4

Adding another OR should work: {if author_id == logged_in_member_id OR logged_in_group_id == "1" OR logged_in_group_id == "6" } Edit This Page ⇑ {/if}


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