Location: PHPKode > projects > XMLNuke Web Development Framework XML > xmlnuke-php5-v3.5r356/xmlnuke-php5/data/sites/docs/xml/en-us/auth_4.en-us.xml
<?xml version="1.0" encoding="utf-8"?>
		<title>Creating your own Login module</title>
		<abstract>How to create your own login module to create personalized access validations.</abstract>
		<created>15/8/2006 15:38:20</created>
		<modified>Sun Sep 14 2008 12:12:15</modified>
		<title>Creating a Login module</title>
			<p>Any module valid for XMLNuke may be a Login module as long as the following conditions are met: 
<ul><li>The module must not require authentication</li><li>At the end it should call Context.MakeLogin()</li><li>The name of this module should be configured under the option: <b>xmlnuke.LOGINMODULE</b> so that XMLNuke understands that it will perform the login.
			<p>XMLNuke implements a class called LoginBase. This class has several routines for sending emails for events such as forgetting a password, generating a new password, among others. To create your Login module, your class should inherit from the LoginBase and should perform the login mechanism (ask for a username, password, etc.). After the ENTIRE validation process is complete, the lines below should be run in the final step to inform XMLNuke that the user LOGGED IN to the system. 

<code information="CSharp"><![CDATA[
// usernamevalid => USERNAME
// userid => User Code

this._context.MakeLogin(usernamevalid, userid);
string Url = FormsAuthentication.GetRedirectUrl(usernamevalid, false);
this._context.redirectUrl( Url );
]]></code><code information="PHP"><![CDATA[
// $usernamevalid => USERNAME
// $id => User Code

$urlReturn = $this->_context->ContextValue("ReturnUrl");

$this->_context->MakeLogin($usernamevalid, $id);
$url = XmlnukeManageUrl::decodeParam($urlReturn);
Return current item: XMLNuke Web Development Framework XML