- Posts: 6
R0.30 Support
[Solved] Non activated users can enter Moodle
- Emanuel
- Topic Author
- Offline
- New Member
-
Less
More
15 years 5 months ago - 15 years 5 months ago #1
by Emanuel
[Solved] Non activated users can enter Moodle was created by Emanuel
I've noticed that users registered through Joomla and that haven't yet activated their account can login in Moodle.
How can I disable this behaviour?
How can I disable this behaviour?
Last edit: 15 years 5 months ago by Antonio Durán.
The topic has been locked.
- Antonio Durán
-
- Offline
- Moderator
-
Less
More
- Posts: 7902
15 years 5 months ago #2
by Antonio Durán
Replied by Antonio Durán on topic Re:Non activated users can enter Moodle
Thanks for the tip.
This code has been rewritten for next release, so this should not happen in R0.4, to be released soon.
If you want to backport the patch, just open plugins/xmlrpc/joomdle.php, and change the login function for this one:
If you try, please report back to see if that solves your problem (I am pretty sure it should).
This code has been rewritten for next release, so this should not happen in R0.4, to be released soon.
If you want to backport the patch, just open plugins/xmlrpc/joomdle.php, and change the login function for this one:
Code:
function login ($username, $password)
{
if (!plgXMLRPCJoomdleServices::check_origin ())
return new xmlrpcresp(0, 1, JText::_("Access Denied"));
$mainframe =& JFactory::getApplication('site');
$options = array ( 'skip_joomdlehooks' => '1');
$credentials = array ( 'username' => $username, 'password' => $password);
if ($mainframe->login( $credentials, $options ))
return true;
return false;
}
If you try, please report back to see if that solves your problem (I am pretty sure it should).
The topic has been locked.
- Emanuel
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 6
15 years 5 months ago #3
by Emanuel
Replied by Emanuel on topic Re:Non activated users can enter Moodle
Thanks for the quick answer, I just tested the patch and it works like a charm.
Thanks once again
Thanks once again
The topic has been locked.