Thanks!!
Hi David,
This is something that we wanted as well so I changed the uploadusers script to do it. I bet there is a more elegant way of doing this but from our point of view every time we uploaded users I wanted to make sure that they would be forced to change their password on next use.
If you are in the same boat then you could also make this change as described here:
edit the file moodle\admin\uploadusers.php (using a simple text editor)
search for $usersnew++ and then add the two lines shown here (the comment line and the set_user_preference link) so that the code now looks like the following: (with or without the line spacing I have shown)
$usersnew++;
// Hack to force password change for all new users in the upload csv file
set_user_preference('auth_forcepasswordchange', 1, $user->id);
if ($createpasswords and empty($user->password)) {
Now save the file and the test it
If you are going to make changes to the code like this then keep a good record of what you have done so that you can apply the same changes when you upgrade to a new version
Hope this works for you
Dave
See http://docs.moodle.org/en/admin/uploaduser.
Thanks!

Dave has sorted out the perfect solution for his organisation (and nice one - works a treat!

- it isn't an option as it forces this feature for all uploaded accounts (please correct me if I'm wrong) but you might not want it to happen all the time, e.g. for test accounts in a training setting.
- it isn't functionality that exists in core Moodle - upgrade time is bad enough without having to redo all the little hacks and tweaks you have done since the last time you upgraded
It's a simple idea so the coding can't be hard!!

Any thoughts?
Please vote for it!!

MDL-20679
Martin