Best practice forum (Archived)

Deze forumdiscussie is verwijderd

 
Dit forumbericht is verwijderd
Thursday, 2 May 2013, 17:49 PM
De inhoud van dit forumbericht is verwijderd en is niet langer toegankelijk.
me
Re: Totara sync password problem
door George Angus - Thursday, 2 May 2013, 21:18 PM
Groep Totara

Hi Lane,

Can you send us a copy of the CSV? 

regards,

 

George.

me
Re: Totara sync password problem
door George Angus - Tuesday, 7 May 2013, 21:29 PM
Groep Totara

Hi Lane,

I got in again OK today with the password uploaded by bulk upload. My feeling is the problem must lie with the custom software - as its the only element which is different.

regards,

George.

Dit forumbericht is verwijderd
Wednesday, 8 May 2013, 03:58 AM
De inhoud van dit forumbericht is verwijderd en is niet langer toegankelijk.
Dit forumbericht is verwijderd
Wednesday, 8 May 2013, 07:12 AM
De inhoud van dit forumbericht is verwijderd en is niet langer toegankelijk.
Dit forumbericht is verwijderd
Wednesday, 8 May 2013, 16:07 PM
De inhoud van dit forumbericht is verwijderd en is niet langer toegankelijk.
me
Re: Totara sync password problem
door George Angus - Wednesday, 8 May 2013, 16:47 PM
Groep Totara

Hi guys,

This is the relevant code:

You can comment out the code causing that in /admin/cron.php around line 440

just add /* */ around the code like this.

+    /*
441         //
442         // generate new password emails for users
443         //
444         mtrace('checking for create_password');
445         if (count_records('user_preferences', 'name', 'create_password', 'value', '1')) {
446             mtrace('creating passwords for new users');
447             $newuserssql = "SELECT u.id as id, u.email, u.firstname, u.lastname, u.username, u.deleted, p.id as prefid
448                               FROM {$CFG->prefix}user u
449                               JOIN {$CFG->prefix}user_preferences p ON u.id=p.userid
450                              WHERE p.name='create_password' AND p.value='1' AND u.email !='' ";
451             if ($newusers = get_records_sql($newuserssql)) {
452                 foreach ($newusers as $newuserid => $newuser) {
453                     $newuser->emailstop = 0; // send email regardless
454                     // email user
455                     if (setnew_password_and_mail($newuser)) {
456                         // remove user pref
457                         delete_records('user_preferences', 'id', $newuser->prefid);
458                     } else {
459                         trigger_error("Could not create and mail new user password!");
460                     }
461                 }
462             }
463         }
+    */