1

I am working on a Joomla 2.5 application connected to Moodle system via Joomdle plugin. Logging into Joomla via Moodle works fine, but not into administration control panel (ACP). I just can't login into the administration panel because Moodle credentials do not fit to Joomla credentials.

First possible solution it to make Joomla auto-login user in to backend (ACP) when hes logged in from Moodle (by Joomla). It's not very safe, I know, but it's my clients request and it's maybe the simplest solution.

Second possible solution is to make Joomla ACP to accept user login using Moodle credentials. But I've no idea how to do that, because credentials stored in Joomla database are different.

So my question is: Is there any configuration or plugin that would solve this problem?

1

As you are in control of both domains (cookies) and databases, you can create an ACP plugin in the same way than a Joomdle plugin works. In fact, ACP is not different than the frontend site. In brief they are just sites based on Joomla libraries loading different sets of plugins, modules, and template.

  1. Registered users never are not going to be able to access ACP. Your users have to be at least members of manager group. Ok?

  2. Authentication plugins are simple. E.g. Login-By-Email plugin is very common. You can check the same Moodle cookies, or access Moodle db to verify the password.

  3. You can review how Joomdle plugin works, and modify it to support ACP.

PD: I've implemented authentication between Joomla and Redmine, and it's possible to implement these bridges. In complex cases, you can implement a signature to redirect users between different domains, but this is not even required to solve it.

  • Creating custom auth plugin solved all my problems! Thanks a lot sir :) – James Jul 6 '14 at 17:39
  • You might want to share the plugin with the joomdle community in case they want to offer it as a solution to people who want to do what you've done :) – Brian Peat Jul 6 '14 at 23:57
1

This is correct, Moodle connects with the FRONT end of joomla, NOT the back end. Even if your user is a super admin, you're being logged into the FRONT end not the back and. Since Joomla treats those logins differently, that's how it works.

I wouldn't try to "fix" this setup, you could make all kinds of issues pop up (and leave the site insecure).

We have a setup using Joomdle and I just know that if I want to work on the BACK end of Joomla, I sign in there specifically.

For the front end, I sign into the front end of the Joomla site and then in there I put a menu link over to the moodle admin (it only shows up for Joomla admins) and I can bounce over there easily. So I log into the J front end and click the link and another tab opens with the moodle interface.

Honestly, if you're like me and you save your login in your browser, since it's all on the same domain, it auto fills anyway so it's 1 extra click.

  • Yes, I know, if it were on me, I would prefer your solution. But OK, there is still posibility that I could explain this to my client. But I still have the problem - I can't login to the backend using Moodle account. How to solve that? – James Jul 6 '14 at 10:37
  • ...one more thing to explain my situation more detaily. If I change the users password in database to the Joomla one (right now, most of users has the same poassword hash), I can login into database, but when I try to login in frontend via Moodle, I get redirection loop. – James Jul 6 '14 at 10:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.