- Posts: 23
Erro Import Moodle for Joomla Users
- Yuri Reis
- Topic Author
- Offline
- Junior Member
-
Less
More
15 years 1 month ago #1
by Yuri Reis
Erro Import Moodle for Joomla Users was created by Yuri Reis
So i'm here again.
you have helped me solve some problems
The problem is - When i created one user into moodle and i click on "add clients for joomla" and then "Migrate user for Joomdle", something happen and I cannot access the user inteface anymore
If i create the user into joomla and i click on "add users to moodle" no problems happens.
Whats wrong?
Help me please
you have helped me solve some problems
The problem is - When i created one user into moodle and i click on "add clients for joomla" and then "Migrate user for Joomdle", something happen and I cannot access the user inteface anymore
If i create the user into joomla and i click on "add users to moodle" no problems happens.
Whats wrong?
Help me please
Please Log in or Create an account to join the conversation.
- Yuri Reis
- Topic Author
- Offline
- Junior Member
-
Less
More
- Posts: 23
15 years 1 month ago #2
by Yuri Reis
Replied by Yuri Reis on topic Re: Erro Import Moodle for Joomla Users
hi guys
i discover one thing..if when i create one user on moodle and i choose the "authentication method" to Joomdle, the problem does not happen.
This is my big problem. I will import a large database already existing, and would not be good modify 3 thousand user.
so i think if i found the place where the auth.php is called i would set the defaut authentication to joomdle.
how can i do this ?
I found this method in signup_form.php
function validation($data, $files) {
global $CFG;
$errors = parent::validation($data, $files);
$authplugin = get_auth_plugin($CFG->registerauth);
if (record_exists('user', 'username', $data, 'mnethostid', $CFG->mnet_localhost_id)) {
$errors = get_string('usernameexists');
} else {
if (empty($CFG->extendedusernamechars)) {
$string = eregi_replace("[^(-\.[:alnum:])]", '', $data);
if (strcmp($data, $string)) {
$errors = get_string('alphanumerical');
}
}
}
and i go to get_auth_plugin($CFG->registerauth) in moodlelib.php
function get_auth_plugin($auth) {
global $CFG;
// check the plugin exists first
if (! exists_auth_plugin($auth)) {
error("Authentication plugin '$auth' not found.");
}
// return auth plugin instance
require_once "{$CFG->dirroot}/auth/$auth/auth.php";
$class = "auth_plugin_$auth";
return new $class;
}
Help me
thanks one more time
i discover one thing..if when i create one user on moodle and i choose the "authentication method" to Joomdle, the problem does not happen.
This is my big problem. I will import a large database already existing, and would not be good modify 3 thousand user.
so i think if i found the place where the auth.php is called i would set the defaut authentication to joomdle.
how can i do this ?
I found this method in signup_form.php
function validation($data, $files) {
global $CFG;
$errors = parent::validation($data, $files);
$authplugin = get_auth_plugin($CFG->registerauth);
if (record_exists('user', 'username', $data, 'mnethostid', $CFG->mnet_localhost_id)) {
$errors = get_string('usernameexists');
} else {
if (empty($CFG->extendedusernamechars)) {
$string = eregi_replace("[^(-\.[:alnum:])]", '', $data);
if (strcmp($data, $string)) {
$errors = get_string('alphanumerical');
}
}
}
and i go to get_auth_plugin($CFG->registerauth) in moodlelib.php
function get_auth_plugin($auth) {
global $CFG;
// check the plugin exists first
if (! exists_auth_plugin($auth)) {
error("Authentication plugin '$auth' not found.");
}
// return auth plugin instance
require_once "{$CFG->dirroot}/auth/$auth/auth.php";
$class = "auth_plugin_$auth";
return new $class;
}
Help me
thanks one more time
Please Log in or Create an account to join the conversation.
- Antonio Durán
-
- Offline
- Moderator
-
Less
More
- Posts: 7909
15 years 1 month ago #3
by Antonio Durán
Replied by Antonio Durán on topic Re: Erro Import Moodle for Joomla Users
Hi.
If you are going to import users from an exisitng Moodle installation, you have to know that:
- When transfering users to Joomla, a new password will be generated (old one will not work)
- the new password is auto-sent to users (at least it should
This is so because moodle passwords are stored crypted, so we can not read them to copy them to Joomla.
If you are going to import users from an exisitng Moodle installation, you have to know that:
- When transfering users to Joomla, a new password will be generated (old one will not work)
- the new password is auto-sent to users (at least it should
This is so because moodle passwords are stored crypted, so we can not read them to copy them to Joomla.
Please Log in or Create an account to join the conversation.
- Yuri Reis
- Topic Author
- Offline
- Junior Member
-
Less
More
- Posts: 23
15 years 1 month ago #4
by Yuri Reis
Replied by Yuri Reis on topic Re: Erro Import Moodle for Joomla Users
maybe this is the problem,
"the new password is auto-sent to users" maybe this procedure nothing working fine.
This is my last point to finalize my integration.
The other problems is - The new courses, and users the moodle is created by other external application that pass just the name, and the email of new user. I set the default authentication method to joomdle, but the problems ocorrer again. I need change the password into the moodle or the joomla to work fine. I think that the this "new password" is not auto-sent to users.
What can i do?
"the new password is auto-sent to users" maybe this procedure nothing working fine.
This is my last point to finalize my integration.
The other problems is - The new courses, and users the moodle is created by other external application that pass just the name, and the email of new user. I set the default authentication method to joomdle, but the problems ocorrer again. I need change the password into the moodle or the joomla to work fine. I think that the this "new password" is not auto-sent to users.
What can i do?
Please Log in or Create an account to join the conversation.
- Chris
-
- Offline
- Moderator
-
15 years 1 month ago #5
by Chris
Replied by Chris on topic Re: Erro Import Moodle for Joomla Users
Hi there,
Just a quick thought, is it possible for your external application to pass the new user details (name, email, password) to Joomla rather than Moodle. This way you can pick up the password?
Also, I assume your external application is already in place, how does it pass the password to users today? You say it passes name and email but how do the users know their passwords?
Just a quick thought, is it possible for your external application to pass the new user details (name, email, password) to Joomla rather than Moodle. This way you can pick up the password?
Also, I assume your external application is already in place, how does it pass the password to users today? You say it passes name and email but how do the users know their passwords?
Please Log in or Create an account to join the conversation.
- Antonio Durán
-
- Offline
- Moderator
-
Less
More
- Posts: 7909
15 years 1 month ago #6
by Antonio Durán
Replied by Antonio Durán on topic Re: Erro Import Moodle for Joomla Users
Hi.
"new password sent to users" is only done when you manually migrate users from joomdle backend, not when thery are auto created.
As Chris points out, ther problem seems to be with your external application creatin users (which will not be correct joomdle users, as joomdle is not created to interact with your own external app)
"new password sent to users" is only done when you manually migrate users from joomdle backend, not when thery are auto created.
As Chris points out, ther problem seems to be with your external application creatin users (which will not be correct joomdle users, as joomdle is not created to interact with your own external app)
Please Log in or Create an account to join the conversation.
- Yuri Reis
- Topic Author
- Offline
- Junior Member
-
Less
More
- Posts: 23
15 years 1 month ago - 15 years 1 month ago #7
by Yuri Reis
Replied by Yuri Reis on topic Re: Erro Import Moodle for Joomla Users
yes...i tryed migrate users to joomdle using the backend, but something happen and the "the new password" dont work fine. i need go to users painel joomla and change the passwordl
I discovery that external user that insert new users in moodle, just insert the data inside database. I know this is wrong, but what can i do ? i dont have access to this external aplication. The only thing that i do is set the default value to auth to joomdle, but the database no start the process that call the joomdle/auth.php to create users on joomla.
I dont know what can i do.
I discovery that external user that insert new users in moodle, just insert the data inside database. I know this is wrong, but what can i do ? i dont have access to this external aplication. The only thing that i do is set the default value to auth to joomdle, but the database no start the process that call the joomdle/auth.php to create users on joomla.
I dont know what can i do.
Last edit: 15 years 1 month ago by Yuri Reis.
Please Log in or Create an account to join the conversation.
- Chris
-
- Offline
- Moderator
-
15 years 1 month ago #8
by Chris
Replied by Chris on topic Re: Erro Import Moodle for Joomla Users
Hi there,
I only see a few options:
1) Gain access to the passwords from the external application and/or change the way the external application integrates
2) Change all passwords with a post routine and post the new password out to the user
3) Find a way to decrypt the Moodle password and make this available to Joomla through a post user creation tool
IMO, the most ideal solution is to work with option number 1.
By doing either 2 or 3, will there be an impact on anything else? For example, if an external application is creating the password, does that password need to be used for other applications / access. Would this then create different applications with different passwords? Would this be confusing to the students? Does this application use AD, OpenId, FB, LDAP, or any other form of user id/pw management?
How do the users know their passwords? Does the external application send an email to them? If so, option 2 would be confusing - receiving two emails with different passwords.
If it difficult to offer advise when nothing is known about the external application, it's purpose and what can and cannot be done.
c
I only see a few options:
1) Gain access to the passwords from the external application and/or change the way the external application integrates
2) Change all passwords with a post routine and post the new password out to the user
3) Find a way to decrypt the Moodle password and make this available to Joomla through a post user creation tool
IMO, the most ideal solution is to work with option number 1.
By doing either 2 or 3, will there be an impact on anything else? For example, if an external application is creating the password, does that password need to be used for other applications / access. Would this then create different applications with different passwords? Would this be confusing to the students? Does this application use AD, OpenId, FB, LDAP, or any other form of user id/pw management?
How do the users know their passwords? Does the external application send an email to them? If so, option 2 would be confusing - receiving two emails with different passwords.
If it difficult to offer advise when nothing is known about the external application, it's purpose and what can and cannot be done.
c
Please Log in or Create an account to join the conversation.
- Antonio Durán
-
- Offline
- Moderator
-
Less
More
- Posts: 7909
15 years 1 month ago #9
by Antonio Durán
Replied by Antonio Durán on topic Re: Erro Import Moodle for Joomla Users
3) is out of the question
The important thing here is to know which is the process that the applicattion uses to create users in moodle.
Web services? export file?
Until you don't know that, nothing can be done.
The important thing here is to know which is the process that the applicattion uses to create users in moodle.
Web services? export file?
Until you don't know that, nothing can be done.
Please Log in or Create an account to join the conversation.
- Yuri Reis
- Topic Author
- Offline
- Junior Member
-
Less
More
- Posts: 23
15 years 4 weeks ago #10
by Yuri Reis
Replied by Yuri Reis on topic Re: Erro Import Moodle for Joomla Users
yes Antonio...The external app send de informations by Web Services to moodle. The most interesting the web service method doesnt pass through auth an arrow and he just set one kind of "auth" on database.
i thought would create a bank that called the process auth of moodle plugin (which automatically creates a user in joomla and interconnectes boths platforms by joomdle)
this is possible?
i thought would create a bank that called the process auth of moodle plugin (which automatically creates a user in joomla and interconnectes boths platforms by joomdle)
this is possible?
Please Log in or Create an account to join the conversation.