authentication - Logging into Moodle via external site -


I am setting up a Moodle environment and I need users to log in using external credentials using their credentials. The that site will ideally go to that website, log in, and then click a button that will send them to Moodle with their account information.

Once they become moodle, then Moodle will check to check whether the account information already exists. If so, this will be the login, otherwise this will create an account and login.

I already have the Moodle environment installed, as well as the login site too. Moodle site is not allowed to access the database on the login site, and users should not re-enter their information at any time.

I have already tried to work behind several hours, a plugin that achieves some similarities between Moodle and social networking sites (Facebook, Twitter, Google + etc.) but have not made any progress , As well as connected to a plug-in, is connected to Moodle, and I have searched here and for some other forums I could get the same as the need to complete for any benefit < p> Edit: I tell this It was forgotten that the version of Moodle is 2.5.4

Edit: In the following, a new user "login / index.php" page is currently very incomplete and possibly applicable to production servers. The updated version will be posted to Dangerous because I continue to work on it, the suggestions are more than welcome.

  Global $ CFG, $ DB; Require_once ($ CFG- & gt; dirroot '/ user / profile / lib.php'.); Require_once ($ CFG-> libdir '/ authlib.php'.); $ News = $ dB- & gt; get_record ('user', array ('id' => 1 ')); $ newuser- & gt; auth = 'manual'; $ newuser- & gt; User Name = $ frm- & gt; User name; $ newuser- & gt; Password = hash_internal_user_password ($ frm- & gt; password); $ newuser- & gt; User Name = $ DB-> insert_record ('user', $ newuser); /// Save any custom profile field information info_save_data ($ newuser); $ News = $ dB- & gt; Get_record ('user', array ('id' = & gt; $ newuser- & gt; username)); events_trigger ('user_created', $ newuser); It is probably the easiest to use external database authentication, especially if both systems are on the same server  

Site Admin & gt; Visit Plugins & gt; Authentication & gt; Manage plugins - & gt; Click the button to be next to the external database

Then click on the settings and add connection details for your database, name the external table (or see if any data is from multiple tables) and add fields Mapping Alternatively, I'll use the simple SALL plugin with LDAP - say you have an LDAP server - about a day to set up and about settings. Dirt in / p>



Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -