Tired of Logging In and Out of your Moodle LMS? Here’s a Smarter Way
As a Moodle LMS site administrator, QA tester or developer, having to switch between different user roles often means repeatedly logging in and out - an inefficient and disruptive workflow. What if you could switch between accounts almost seamlessly? After experiencing the frustration of logging in and out repeatedly just to test different user roles and seeing others doing the same, I knew there had to be a better way.
That's where the Auth Development Tools plugin, maintained by Carlos Escobedo, comes in. Once installed and enabled, this really tool allows a Site Administrator to use Moodle’s Log In As feature to access a test user account and return to their admin session after logging out—without having to log in again manually. While it may not take you back to the exact page you were on, it does redirect you to either the site home page or a course main page if you are in one, significantly reducing clicks and saving valuable time and effort.
What is Moodle LMS' Log In As?
Moodle’s Log In As feature allows administrators to log in as another user without needing their password. This feature is particularly useful for troubleshooting or viewing the platform from a student's or another user's perspective. When using it, the admin can access the user’s account and see exactly what that user would see, which can help in understanding how content, settings, or activities appear to different users.
This can be particularly helpful for:
- Checking if a course's settings are displaying correctly for students.
- Monitoring student progress or participation in specific activities.
- Troubleshooting technical issues related to user experience.
More information on Log In As.
Save Even More Time with This Primary Custom Menu Trick
Regardless of whether or not you have that Moodle LMS plugin installed, you can add links in the custom menu to log you in as various pre-configured Test Users.
Note that FilterCodes will need to be installed and enabled. Your Moodle LMS, or your theme, will also need to be patched for this to work. See FilterCodes documentation for more information on how to do this. Example:
{ifadmin}
{ifnotloggedinas}
Login As
-Student 1|/course/loginas.php?id={courseid}&user=3&sesskey={sesskey}
-Student 2|/course/loginas.php?id={courseid}&user=7&sesskey={sesskey}
-Teacher|/course/loginas.php?id={courseid}&user=4&sesskey={sesskey}
-Manager|/course/loginas.php?id={courseid}&user=5&sesskey={sesskey}
{/ifnotloggedinas}
{/ifadmin}
With the plugin and these menu items in place, I can literally zip in and out of test accounts in just a few seconds and a couple of clicks.
Streamline Your Moodle LMS Workflow Today
With the Auth Development Tools plugin, Moodle LMS administrators and developers can eliminate the frustration of repeatedly logging back in after using the Log In As feature. Pairing this with FilterCodes for quick access to test user accounts makes managing your Moodle LMS environment even more efficient. These simple optimizations allow you to focus on what truly matters—configuring, testing, and improving your LMS without unnecessary interruptions. Try these tools today and streamline your Moodle workflow!
Hope you found this information helpful.
Michael Milette
Add a comment: