hi, I want to import all user into lms from ldap.
How do I this process ?
Do you know?
how do I auto import all users from ldap?
how do I auto import all users from ldap?
Hello,I'm Murat. If you need me, you can contact my mail
Re: how do I auto import all users from ldap?
I wrote a workaround that automatically adds the user to the database users, after the login (obviously after verifying that the LDAP accepts the login).
If you are interested i can share the code.
If you are interested i can share the code.
Re: how do I auto import all users from ldap?
very interesting feature
can you share the code ? we will integrate in forma.lms 2.0
claudio
can you share the code ? we will integrate in forma.lms 2.0
claudio
Cercate nel forum le riposte prima di chiedere. Check the forum before posting
---------------
Claudio Anelli
Joint Technologies - Sistemi avanzati per l'information technology
http://www.joint-tech.com
---------------
---------------
Claudio Anelli
Joint Technologies - Sistemi avanzati per l'information technology
http://www.joint-tech.com
---------------
Re: how do I auto import all users from ldap?
barlasd wrote:I wrote a workaround that automatically adds the user to the database users, after the login (obviously after verifying that the LDAP accepts the login).
If you are interested i can share the code.
please , can you share your codes?
Hello,I'm Murat. If you need me, you can contact my mail
Re: how do I auto import all users from ldap?
Edit the file lib.user.php into the folder lib:
Replace the rows 231-235 with this code:
enjoy
Replace the rows 231-235 with this code:
Code: Select all
if( $user_info === false ){
if(Get::sett('ldap_used') == 'on') {
$ldap_conn = @ldap_connect( Get::sett('ldap_server'), Get::sett('ldap_port', '389'));
$ldap_user = ereg_replace( '\$user', $login, Get::sett('ldap_user_string') );
if(ldap_bind($ldap_conn, $ldap_user, $password))
{
ldap_close($ldap_conn);
$logldap = "/".$login;
list($userid) = sql_fetch_row(sql_query("SELECT userid FROM core_user WHERE userid='$logldap'"));
if($userid == ""){
$date = date("Y-m-d H:i:s");
list($idstMember) = sql_fetch_row(sql_query("SELECT max(idst)+1 FROM core_st"));
sql_query("INSERT INTO core_user (idst, userid, valid, register_date) VALUES ($idstMember,'$logldap',1,'$date')");
sql_query("INSERT INTO core_st (idst) VALUES ('$idstMember')");
sql_query("INSERT INTO core_group_members (idst, idstMember) VALUES (1,'$idstMember')");
}
}
else{
return $ret_value;
}
}
else{
return $ret_value;
}
}
if( $user_info[ACL_INFO_VALID] != '1' && Get::sett('ldap_used') == 'off'){
return $ret_value;
}
Re: how do I auto import all users from ldap?
Thank for sharing your work.
We will integrate this in forma.lms 2.x .
I hope in the 2.0, but we are in the final beta status and soon we will enter in the Release canditate status, so I'm not sure that we can made the change. For sure te code will be integrated in the 2.1
Claudio
We will integrate this in forma.lms 2.x .
I hope in the 2.0, but we are in the final beta status and soon we will enter in the Release canditate status, so I'm not sure that we can made the change. For sure te code will be integrated in the 2.1
Claudio
Cercate nel forum le riposte prima di chiedere. Check the forum before posting
---------------
Claudio Anelli
Joint Technologies - Sistemi avanzati per l'information technology
http://www.joint-tech.com
---------------
---------------
Claudio Anelli
Joint Technologies - Sistemi avanzati per l'information technology
http://www.joint-tech.com
---------------
Re: how do I auto import all users from ldap?
Hi Claudio,
Is there a way to access to betatesting of the Forma 2.0 version?
I'm curious to see the new features.
Grazie.
Is there a way to access to betatesting of the Forma 2.0 version?
I'm curious to see the new features.
Grazie.
Re: how do I auto import all users from ldap?
hi barlasd .
to access beta you must enter in the "Contribution program".
you must fille the form available at www.formalms.org
to access beta you must enter in the "Contribution program".
you must fille the form available at www.formalms.org
Cercate nel forum le riposte prima di chiedere. Check the forum before posting
---------------
Claudio Anelli
Joint Technologies - Sistemi avanzati per l'information technology
http://www.joint-tech.com
---------------
---------------
Claudio Anelli
Joint Technologies - Sistemi avanzati per l'information technology
http://www.joint-tech.com
---------------
Re: how do I auto import all users from ldap?
I had tried but i can't see the captcha...
- Attachments
-
- Cattura.PNG (1.08 KiB) Viewed 6487 times
Re: how do I auto import all users from ldap?
Captcha fixed, thanks for noticing it