]> git.mjollnir.org Git - moodle.git/commitdiff
Tweaks to authentication system. Database method now allows other
authormoodler <moodler>
Thu, 21 Nov 2002 07:37:21 +0000 (07:37 +0000)
committermoodler <moodler>
Thu, 21 Nov 2002 07:37:21 +0000 (07:37 +0000)
fields to be specified so that things like email, names etc can be
pulled in from external database when new Moodle accounts are created

admin/auth.php
auth/db/config.html
auth/db/lib.php
auth/imap/config.html
auth/ldap/config.html
auth/nntp/config.html
auth/pop3/config.html
lang/en/auth.php
lang/en/moodle.php
lib/moodlelib.php

index fcb657c7cd131f510cdcd581fee04c479a2bd6dd..60458971bc68d662e8a5394616b7f6f8dc7bfcef 100644 (file)
     require("$CFG->dirroot/auth/$auth/config.html");
 
     echo "<tr valign=\"top\">";
-       echo "<td align=right><p>guestloginbutton:</p></td>";
+       echo "<td align=right nowrap><p>";
+    print_string("guestloginbutton", "auth");
+    echo ":</p></td>";
        echo "<td>";
     choose_from_menu($guestoptions, "guestloginbutton", $config->guestloginbutton, "");
     echo "</td>";
index 493b921e9cf887a8c3690ca36f66515ec5246650..56b53bd1cd6611bba5eb42b3fdaba14ff6d6d7e0 100644 (file)
@@ -1,4 +1,4 @@
-<tr valign="top">
+<tr valign="top"  BGCOLOR="<?=$THEME->cellheading2 ?>">
        <TD ALIGN=RIGHT><P>auth_dbhost:</TD>
        <TD>
         <INPUT name=auth_dbhost TYPE=text SIZE=30 VALUE="<?=$config->auth_dbhost?>">
@@ -9,7 +9,7 @@
     </TD>
 </TR>
 
-<TR VALIGN=TOP>
+<TR VALIGN=TOP  BGCOLOR="<?=$THEME->cellheading2 ?>">
        <TD ALIGN=RIGHT><P>auth_dbtype:</TD>
        <TD>
     <? $dbtypes = array("access","ado_access", "ado", "ado_mssql", "borland_ibase", "csv", "db2", "fbsql", "firebird", "ibase", "informix72", "informix", "mssql", "mysql", "mysqlt", "oci805", "oci8", "oci8po", "odbc", "odbc_mssql", "odbc_oracle", "oracle", "postgres64", "postgres7", "postgres", "proxy", "sqlanywhere", "sybase", "vfp");
@@ -22,7 +22,7 @@
     </TD>
 </TR>
 
-<TR VALIGN=TOP>
+<TR VALIGN=TOP  BGCOLOR="<?=$THEME->cellheading2 ?>">
        <TD ALIGN=RIGHT><P>auth_dbname:</TD>
        <TD>
     <INPUT name=auth_dbname TYPE=text SIZE=30 VALUE="<?=$config->auth_dbname?>">
@@ -33,7 +33,7 @@
     </TD>
 </TR>
 
-<TR VALIGN=TOP>
+<TR VALIGN=TOP  BGCOLOR="<?=$THEME->cellheading2 ?>">
        <TD ALIGN=RIGHT><P>auth_dbuser:</TD>
        <TD>
     <INPUT name=auth_dbuser TYPE=text SIZE=30 VALUE="<?=$config->auth_dbuser?>">
@@ -44,7 +44,7 @@
     </TD>
 </TR>
 
-<TR VALIGN=TOP>
+<TR VALIGN=TOP  BGCOLOR="<?=$THEME->cellheading2 ?>">
        <TD ALIGN=RIGHT><P>auth_dbpass:</TD>
        <TD>
     <INPUT name="auth_dbpass" TYPE="text" SIZE="30" VALUE="<?=$config->auth_dbpass?>">
@@ -55,7 +55,7 @@
     </TD>
 </TR>
 
-<TR VALIGN=TOP>
+<TR VALIGN=TOP  BGCOLOR="<?=$THEME->cellheading2 ?>">
        <TD ALIGN=RIGHT><P>auth_dbtable:</TD>
        <TD>
     <INPUT name="auth_dbtable" TYPE="text" SIZE="30" VALUE="<?=$config->auth_dbtable?>">
@@ -66,7 +66,7 @@
     </TD>
 </TR>
 
-<TR VALIGN=TOP>
+<TR VALIGN=TOP  BGCOLOR="<?=$THEME->cellheading2 ?>">
        <TD ALIGN=RIGHT><P>auth_dbfielduser:</TD>
        <TD>
     <INPUT name="auth_dbfielduser" TYPE="text" SIZE="30" VALUE="<?=$config->auth_dbfielduser?>">
@@ -77,7 +77,7 @@
     </TD>
 </TR>
 
-<TR VALIGN=TOP>
+<TR VALIGN=TOP  BGCOLOR="<?=$THEME->cellheading2 ?>">
        <TD ALIGN=RIGHT><P>auth_dbfieldpass:</TD>
        <TD>
     <INPUT name="auth_dbfieldpass" TYPE="text" SIZE="30" VALUE="<?=$config->auth_dbfieldpass?>">
     </TD>
 </TR>
 
+<TR>
+       <TD ALIGN=RIGHT><P><? print_string("firstname") ?>:</TD>
+       <TD>
+    <INPUT name="auth_user_firstname" TYPE="text" SIZE="30" VALUE="<?=$config->auth_user_firstname?>">
+    </TD>
+    <TD rowspan=12 VALIGN=CENTER>
+    <? print_string("auth_dbextrafields","auth") ?>
+    </TD>
+</TR>
+
+<TR VALIGN=TOP>
+       <TD ALIGN=RIGHT><P><? print_string("lastname") ?>:</TD>
+       <TD>
+    <INPUT name="auth_user_lastname" TYPE="text" SIZE="30" VALUE="<?=$config->auth_user_lastname?>">
+    </TD>
+</TR>
+
+<TR VALIGN=TOP>
+       <TD ALIGN=RIGHT><P><? print_string("email") ?>:</TD>
+       <TD>
+    <INPUT name="auth_user_email" TYPE="text" SIZE="30" VALUE="<?=$config->auth_user_email?>">
+    </TD>
+</TR>
+
+<TR VALIGN=TOP>
+       <TD ALIGN=RIGHT><P><? print_string("phone") ?> 1:</TD>
+       <TD>
+    <INPUT name="auth_user_phone1" TYPE="text" SIZE="30" VALUE="<?=$config->auth_user_phone1?>">
+    </TD>
+</TR>
+
+<TR VALIGN=TOP>
+       <TD ALIGN=RIGHT><P><? print_string("phone") ?> 2:</TD>
+       <TD>
+    <INPUT name="auth_user_phone2" TYPE="text" SIZE="30" VALUE="<?=$config->auth_user_phone2?>">
+    </TD>
+</TR>
+
+<TR VALIGN=TOP>
+       <TD ALIGN=RIGHT><P><? print_string("department") ?>:</TD>
+       <TD>
+    <INPUT name="auth_user_department" TYPE="text" SIZE="30" VALUE="<?=$config->auth_user_department?>">
+    </TD>
+</TR>
+
+<TR VALIGN=TOP>
+       <TD ALIGN=RIGHT><P><? print_string("address") ?>:</TD>
+       <TD>
+    <INPUT name="auth_user_address" TYPE="text" SIZE="30" VALUE="<?=$config->auth_user_address?>">
+    </TD>
+</TR>
+
+<TR VALIGN=TOP>
+       <TD ALIGN=RIGHT><P><? print_string("city") ?>:</TD>
+       <TD>
+    <INPUT name="auth_user_city" TYPE="text" SIZE="30" VALUE="<?=$config->auth_user_city?>">
+    </TD>
+</TR>
+
+<TR VALIGN=TOP>
+       <TD ALIGN=RIGHT><P><? print_string("country") ?>:</TD>
+       <TD>
+    <INPUT name="auth_user_country" TYPE="text" SIZE="30" VALUE="<?=$config->auth_user_country?>">
+    </TD>
+</TR>
+
+<TR VALIGN=TOP>
+       <TD ALIGN=RIGHT><P><? print_string("description") ?>:</TD>
+       <TD>
+    <INPUT name="auth_user_description" TYPE="text" SIZE="30" VALUE="<?=$config->auth_user_description?>">
+    </TD>
+</TR>
+
+<TR VALIGN=TOP>
+       <TD ALIGN=RIGHT><P><? print_string("idnumber") ?>:</TD>
+       <TD>
+    <INPUT name="auth_user_idnumber" TYPE="text" SIZE="30" VALUE="<?=$config->auth_user_idnumber?>">
+    </TD>
+</TR>
+
+<TR VALIGN=TOP>
+       <TD ALIGN=RIGHT><P><? print_string("language") ?>:</TD>
+       <TD>
+    <INPUT name="auth_user_lang" TYPE="text" SIZE="30" VALUE="<?=$config->auth_user_lang?>">
+    </TD>
+</TR>
+
+
 <TR VALIGN=TOP>
-       <TD ALIGN=RIGHT><P>auth_instructions:</TD>
+       <TD ALIGN=RIGHT><P><? print_string("instructions", "auth") ?>:</TD>
        <TD>
     <TEXTAREA NAME=auth_instructions COLS=30 ROWS=10 WRAP=virtual><? p($config->auth_instructions) ?></TEXTAREA> 
     </TD>
index 28aeee25bca5fbc5eae2112fcb521edb388b87d6..45ed5cf0d3d06fc9fe1853e90e5716b1fd80b0bb 100644 (file)
@@ -32,4 +32,35 @@ function auth_user_login ($username, $password) {
 }
 
 
+function auth_get_userinfo($username){
+// Reads any other information for a user from external database,
+// then returns it in an array
+
+    global $CFG;
+    $config = (array) $CFG;
+
+    ADOLoadCode($CFG->auth_dbtype);          
+    $authdb = &ADONewConnection();         
+    $authdb->PConnect($CFG->auth_dbhost,$CFG->auth_dbuser,$CFG->auth_dbpass,$CFG->auth_dbname); 
+
+    $fields = array("firstname", "lastname", "email", "phone1", "phone2", 
+                    "department", "address", "city", "country", "description", 
+                    "idnumber", "lang");
+
+    $result = array();
+
+    foreach ($fields as $field) {
+        if ($config["auth_user_$field"]) {
+            if ($rs = $authdb->Execute("SELECT ".$config["auth_user_$field"]." FROM $CFG->auth_dbtable
+                                        WHERE $CFG->auth_dbfielduser = '$username'")) {
+                if ( $rs->RecordCount() == 1 ) {
+                    $result["$field"] = $rs->fields[$config["auth_user_$field"]];
+                }
+            }
+        }
+    }
+
+    return $result;
+}
+
 ?>
index 2f0e5c7a009b2b02d523eeada380e5c4a7342d2d..34b3975cc618cc391469594100cd6b923fdec9c2 100644 (file)
@@ -1,4 +1,4 @@
-<tr valign="top">
+<tr valign="top" BGCOLOR="<?=$THEME->cellheading2 ?>">
        <TD ALIGN=RIGHT><P>auth_imaphost:</TD>
        <TD>
         <INPUT name=auth_imaphost TYPE=text SIZE=30 VALUE="<?=$config->auth_imaphost?>">
@@ -9,7 +9,7 @@
     </TD>
 </TR>
 
-<TR VALIGN=TOP>
+<TR VALIGN=TOP BGCOLOR="<?=$THEME->cellheading2 ?>">
        <TD ALIGN=RIGHT><P>auth_imaptype:</TD>
        <TD>
     <? $imaptypes = array("imap","imapssl", "imapcert", "imaptls");
@@ -21,7 +21,7 @@
     </TD>
 </TR>
 
-<TR VALIGN=TOP>
+<TR VALIGN=TOP BGCOLOR="<?=$THEME->cellheading2 ?>">
        <TD ALIGN=RIGHT><P>auth_imapport:</TD>
        <TD>
     <INPUT name=auth_imapport TYPE=text SIZE=6 VALUE="<?=$config->auth_imapport?>">
@@ -33,7 +33,7 @@
 </TR>
 
 <TR VALIGN=TOP>
-       <TD ALIGN=RIGHT><P>auth_instructions:</TD>
+       <TD ALIGN=RIGHT><P><? print_string("instructions", "auth") ?>:</TD>
        <TD>
     <TEXTAREA NAME=auth_instructions COLS=30 ROWS=10 WRAP=virtual><? p($config->auth_instructions) ?></TEXTAREA> 
     </TD>
index 6a8a26ffa04ec584402e6967414766c0419607f1..9ca38164f523b9e45af09818677cbed407b31840 100644 (file)
@@ -63,7 +63,7 @@
 </TR>
 
 <TR VALIGN=TOP>
-       <TD ALIGN=RIGHT><P>auth_instructions:</TD>
+       <TD ALIGN=RIGHT><P><? print_string("instructions", "auth") ?>:</TD>
        <TD>
     <TEXTAREA NAME=auth_instructions COLS=30 ROWS=10 WRAP=virtual><? p($config->auth_instructions) ?></TEXTAREA> 
     </TD>
index f9492914c43164d8cdca60de53f82dd339d339d4..5b4375e75be25e7598e189aad6ef72b2498fb6de 100644 (file)
@@ -1,4 +1,4 @@
-<tr valign="top">
+<tr valign="top" BGCOLOR="<?=$THEME->cellheading2 ?>">
        <TD ALIGN=RIGHT><P>auth_nntphost:</TD>
        <TD>
         <INPUT name="auth_nntphost" TYPE="text" SIZE=30 VALUE="<?=$config->auth_nntphost?>">
@@ -9,7 +9,7 @@
     </TD>
 </TR>
 
-<TR VALIGN=TOP>
+<TR VALIGN=TOP BGCOLOR="<?=$THEME->cellheading2 ?>">
        <TD ALIGN=RIGHT><P>auth_nntpport:</TD>
        <TD>
     <INPUT name=auth_imapport TYPE=text SIZE=6 VALUE="<?=$config->auth_nntpport?>">
@@ -21,7 +21,7 @@
 </TR>
 
 <TR VALIGN=TOP>
-       <TD ALIGN=RIGHT><P>auth_instructions:</TD>
+       <TD ALIGN=RIGHT><P><? print_string("instructions", "auth") ?>:</TD>
        <TD>
     <TEXTAREA NAME=auth_instructions COLS=30 ROWS=10 WRAP=virtual><? p($config->auth_instructions) ?></TEXTAREA> 
     </TD>
index 97fb3d3f849f931eff0a9e4ec86a89e05f047c11..a219c13e413ade9f894afc7d6bb851c374acb6e6 100644 (file)
@@ -1,4 +1,4 @@
-<tr valign="top">
+<tr valign="top" BGCOLOR="<?=$THEME->cellheading2 ?>">
        <TD ALIGN=RIGHT><P>auth_pop3host:</TD>
        <TD>
         <INPUT name=auth_pop3host TYPE=text SIZE=30 VALUE="<?=$config->auth_pop3host?>">
@@ -9,7 +9,7 @@
     </TD>
 </TR>
 
-<TR VALIGN=TOP>
+<TR VALIGN=TOP BGCOLOR="<?=$THEME->cellheading2 ?>">
        <TD ALIGN=RIGHT><P>auth_pop3type:</TD>
        <TD>
     <? $pop3types = array("pop3","pop3cert");
@@ -22,7 +22,7 @@
     </TD>
 </TR>
 
-<TR VALIGN=TOP>
+<TR VALIGN=TOP BGCOLOR="<?=$THEME->cellheading2 ?>">
        <TD ALIGN=RIGHT><P>auth_pop3port:</TD>
        <TD>
     <INPUT name=auth_pop3port TYPE=text SIZE=6 VALUE="<?=$config->auth_pop3port?>">
@@ -34,7 +34,7 @@
 </TR>
 
 <TR VALIGN=TOP>
-       <TD ALIGN=RIGHT><P>auth_instructions:</TD>
+       <TD ALIGN=RIGHT><P><? print_string("instructions", "auth") ?>:</TD>
        <TD>
     <TEXTAREA NAME=auth_instructions COLS=30 ROWS=10 WRAP=virtual><? p($config->auth_instructions) ?></TEXTAREA> 
     </TD>
index 1e6c64c5d3c8733aac5da1a9b63d0f99c19fbc76..427baf57208588e41bcaa31b633650977f05dc5a 100644 (file)
@@ -1,22 +1,26 @@
-<?PHP
-$string['showguestlogin'] = "You can hide or show the guest login button on the login page.";
-$string['authenticationoptions'] = "Authentication options";
-$string['authinstructions'] = "Here you can provide instructions for your users, so they know which username and password they should be using.  The text you enter here will appear on the login page.  If you leave this blank then no instructions will be printed.";
+<?PHP // $Id$ 
+      // auth.php - created with Moodle 1.0.6.4 beta (2002112001)
 
-$string['chooseauthmethod'] = "Choose an authentication method: ";
 
-$string['auth_emailtitle'] = "Email-based authentication";
+$string['auth_dbdescription'] = "This method uses an external database table to check whether a given username and password is valid.";
+$string['auth_dbextrafields'] = "These fields are optional.  You can choose to pre-fill some Moodle user fields with information from the <B>external database fields</B> that you specify here. <P>If you leave these blank, then defaults will be used.<P>In either case, the user will be able to edit all of these fields after they log in.";
+$string['auth_dbfieldpass'] = "Name of the field containing passwords";
+$string['auth_dbfielduser'] = "Name of the field containing usernames";
+$string['auth_dbhost'] = "The computer hosting the database server.";
+$string['auth_dbname'] = "Name of the database itself";
+$string['auth_dbpass'] = "Password matching the above username";
+$string['auth_dbtable'] = "Name of the table in the database";
+$string['auth_dbtitle'] = "Use an external database";
+$string['auth_dbtype'] = "The database type (See the <A HREF=../lib/adodb/readme.htm#drivers>ADOdb documentation</A> for details)";
+$string['auth_dbuser'] = "Username with read access to the database";
 $string['auth_emaildescription'] = "Email confirmation is the default authentication method.  When the user signs up, choosing their own new username and password, a confirmation email is sent to the user's email address.  This email contains a secure link to a page where the user can confirm their account.";
-
-$string['auth_nonetitle'] = "No authentication";
-$string['auth_nonedescription'] = "Users can sign in and create valid accounts immediately, with no authentication against an external server and no confirmation via email.  Be careful using this option - think of the security and administration problems this could cause.";
-
-$string['auth_ldaptitle'] = "Use an LDAP server";
-$string['auth_ldapdescription'] = "This method provides authentication against an external LDAP server.
-                                  If the given username and password are valid, Moodle creates a new user 
-                                  entry in its database. This module can read user attributes from LDAP and prefill 
-                                  wanted fields in Moodle.  For following logins only the username and 
-                                  password are checked.";
+$string['auth_emailtitle'] = "Email-based authentication";
+$string['auth_imapdescription'] = "This method uses an IMAP server to check whether a given username and password is valid.";
+$string['auth_imaphost'] = "The IMAP server address. Use the IP number, not DNS name.";
+$string['auth_imapport'] = "IMAP server port number. Usually this is 143 or 993.";
+$string['auth_imaptitle'] = "Use an IMAP server";
+$string['auth_imaptype'] = "The IMAP server type.  IMAP servers can have different types of authentication and negotiation.";
+$string['instructions'] = "Instructions";
 $string['auth_ldap_bind_dn'] = "If you want to use bind-user to search users, specify it here. Someting like 'cn=ldapuser,ou=public,o=org'";
 $string['auth_ldap_bind_pw'] = "Password for bind-user.";
 $string['auth_ldap_contexts'] = "List of contexts where users are located. Separate different contexts with ';'. For example: 'ou=users,o=org; ou=others,o=org'";
@@ -24,33 +28,27 @@ $string['auth_ldap_host_url'] = "Specify LDAP host in URL-form like 'ldap://ldap
 $string['auth_ldap_search_sub'] = "Put value &lt;&gt; 0 if  you like to search users from subcontexts.";
 $string['auth_ldap_update_userinfo'] = "Update user information (firstname, lastname, address..) from LDAP to Moodle. Look at /auth/ldap/attr_mappings.php for mapping information";
 $string['auth_ldap_user_attribute'] = "The attribute used to name/search users. Usually 'cn'.";
-
-$string['auth_imaptitle'] = "Use an IMAP server";
-$string['auth_imapdescription'] = "This method uses an IMAP server to check whether a given username and password is valid.";
-$string['auth_imaphost'] = "The IMAP server address. Use the IP number, not DNS name.";
-$string['auth_imaptype'] = "The IMAP server type.  See the help page (above) for more details.";
-$string['auth_imapport'] = "IMAP server port number. Usually this is 143 or 993.";
-
-$string['auth_dbtitle'] = "Use an external database";
-$string['auth_dbdescription'] = "This method uses an external database table to check whether a given username and password is valid.";
-$string['auth_dbhost']   = "The computer hosting the database server.";
-$string['auth_dbtype']   = "The database type (See the <A HREF=../lib/adodb/readme.htm#drivers>ADOdb documentation</A> for details)";
-$string['auth_dbname']   = "Name of the database itself";
-$string['auth_dbuser']   = "Username with read access to the database";
-$string['auth_dbpass']   = "Password matching the above username";
-$string['auth_dbtable']  = "Name of the table in the database";
-$string['auth_dbfielduser'] = "Name of the field containing usernames";
-$string['auth_dbfieldpass'] = "Name of the field containing passwords";
-
-$string['auth_nntptitle'] = "Use an NNTP server";
+$string['auth_ldapdescription'] = "This method provides authentication against an external LDAP server.\r
+                                  If the given username and password are valid, Moodle creates a new user \r
+                                  entry in its database. This module can read user attributes from LDAP and prefill \r
+                                  wanted fields in Moodle.  For following logins only the username and \r
+                                  password are checked.";
+$string['auth_ldaptitle'] = "Use an LDAP server";
 $string['auth_nntpdescription'] = "This method uses an NNTP server to check whether a given username and password is valid.";
-$string['auth_nntphost']   = "The NNTP server address. Use the IP number, not DNS name.";
-$string['auth_nntpport']   = "Server port (119 is the most common)";
-
-$string['auth_pop3title'] = "Use a POP3 server";
+$string['auth_nntphost'] = "The NNTP server address. Use the IP number, not DNS name.";
+$string['auth_nntpport'] = "Server port (119 is the most common)";
+$string['auth_nntptitle'] = "Use an NNTP server";
+$string['auth_nonedescription'] = "Users can sign in and create valid accounts immediately, with no authentication against an external server and no confirmation via email.  Be careful using this option - think of the security and administration problems this could cause.";
+$string['auth_nonetitle'] = "No authentication";
 $string['auth_pop3description'] = "This method uses a POP3 server to check whether a given username and password is valid.";
-$string['auth_pop3host']   = "The POP3 server address. Use the IP number, not DNS name.";
-$string['auth_pop3type']  = "Server type. If your server uses certificate security, choose pop3cert.";
-$string['auth_pop3port']   = "Server port (110 is the most common)";
+$string['auth_pop3host'] = "The POP3 server address. Use the IP number, not DNS name.";
+$string['auth_pop3port'] = "Server port (110 is the most common)";
+$string['auth_pop3title'] = "Use a POP3 server";
+$string['auth_pop3type'] = "Server type. If your server uses certificate security, choose pop3cert.";
+$string['authenticationoptions'] = "Authentication options";
+$string['authinstructions'] = "Here you can provide instructions for your users, so they know which username and password they should be using.  The text you enter here will appear on the login page.  If you leave this blank then no instructions will be printed.";
+$string['chooseauthmethod'] = "Choose an authentication method: ";
+$string['guestloginbutton'] = "Guest login button";
+$string['showguestlogin'] = "You can hide or show the guest login button on the login page.";
 
 ?>
index b7f3365187d6b087dbdcbc6dc856cbeb778efa39..202a78c48b3204b8eead47aba4c76402e9086f1f 100644 (file)
@@ -106,6 +106,7 @@ $string['deletedactivity'] = "Deleted \$a";
 $string['deletedcourse'] = "\$a has been completely deleted";
 $string['deletednot'] = "Could not delete \$a !";
 $string['deletingcourse'] = "Deleting \$a";
+$string['department'] = "Department";
 $string['description'] = "Description";
 $string['displayingusers'] = "Displaying users \$a->start to \$a->end";
 $string['documentation'] = "Moodle Documentation";
@@ -230,6 +231,7 @@ $string['invalidlogin'] = "Invalid login, please try again";
 $string['invalidemail'] = "Invalid email address";
 $string['langltr'] = "Language direction left-to-right";
 $string['langrtl'] = "Language direction right-to-left";
+$string['language'] = "Language";
 $string['languagegood'] = "This language pack is up-to-date! :-)";
 $string['lastaccess'] = "Last access";
 $string['lastedited'] = "Last edited";
index 815cedf54ab7f37e2156e9eccbf9fff072873acc..2f6b11a8eae9a6ef2d5325676b800fa3ba876ff2 100644 (file)
@@ -1403,7 +1403,7 @@ function create_user_record($username, $password) {
 
     if ($CFG->auth_update_userinfo and function_exists(auth_get_userinfo)) {
         if ($newinfo = auth_get_userinfo($username)) {
-            foreach ($newinfo as $key=>$value){
+            foreach ($newinfo as $key => $value){
                 $newuser->$key = $value;
             }
         }