jump to navigation

Login From a Different Website to Moodle September 9, 2011

Posted by Tournas Dimitrios in Moodle.

The purpose of the Login block is for users to authenticate themselves by entering their username and password. It is possible to log into Moodle from a different website , maybe your organization’s homepage , effectively avoiding the Login block . To implement this , you will have to add some HTML code on that page as shown :

<form class="loginform" name="login" method="post" action="http://www.mysite.com/login/index.php">
<p>Username :
<input size="10" name="username" />
<p>Password :
<input size="10" name="password" type="password" />
<input name="Submit" value="Login" type="submit" />

The form will pass the username and password to your Moodle system. You will have to replace http://www.mysite.com with your URL. This address has to be entered in the Alternate Login URL field at Users | Authentication | Manage authentication in the Site Administration block.



1. Andy - February 15, 2012

Hi there
Thanks for posting this. I’m hoping to connect a new wordpress site to a moodle site, and would like to have one set of login details.

Can you tell me where I insert the code to get it to work?



tournasdimitrios1 - February 15, 2012

Hi Andy ,
Moodle has it’s own database-tables to store User’s credentials , so dubble log-in is required.
A posible solution would be to create an user account on Moodle’s site that has the same credentials as WordPress site . Now on the sidebar of WordPress drag/drop a “text-widget” , this widget will contain the html-login-form as demonstated in the article (of course the URL must mirror your Moodle’s site ) .
Let me know if you need more help .

2. sarath - September 23, 2012

thanks a lot as you saved me
I searched a lot on integration of my website to moodle but the page helped me a lot on creating a module for my self

tournasdimitrios1 - September 23, 2012

I’m glad it helped you .
Thanks for commenting on this Blog .

3. DN - December 25, 2012

Soo helpful!!!
Thanx a lot!!!!

Have a nice year ahead and keep posting..

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s