Your EE module, plugin, and extension marketplace!
This is an Expression Engine plugin that allows you to automatically log a site visitor in from any template without having to collect details from them, great for stand-alone entry forms.
* Current Version: 1.2 (released 19 December 2008)
* Works with ExpressionEngine 1.6 and higher.
I developed this plugin because I wanted to allow site visitors to be able to submit stand-alone entry forms. The problem stems from the fact that in EE, visitors must be logged in to submit stand-alone entry forms. However quite often you will want to allow guests to submit forms without requiring them to create an account first. This plugin solves the problem by automatically logging them in for you.
Find out more about stand-alone entry forms.
The plugin simply logs the visitor in as a user that you specify. So for example, you could set up a user account with username priveleged_guest, and assign it to any member group, say priveleged_members, that has weblog posting privelages to a weblog, sayvisitor_feedback
You could then put call the plugin from a template in which you have a stand-alone entry form that you want to allow guests to submit:
{exp:logmein:now username="priveleged_guest" if_member_group="3" expire="300"}
{exp:weblog:entry_form weblog="visitor_feedback"}
Name: <input type="text" name="name" /><br />
Email: <input type="text" name="email" /><br />
Feedback: <textarea name="feedback"> </textarea><br />
<input type="submit" value="submit" />
{/exp:weblog:entry_form}
The username parameter is required.
The if_member_group parameter is optional and defines the member group id that the current user must belong to (for example guest users).
The expire parameter is optional and sets the expiration time in seconds of the cookie. So in the example above the user will be logged in for only 5 minutes. The default value is 1 day.
You can also log the user out at any time by using the following tag:
{exp:logmein:logout}