I have at least one archived site where I used your example code except in my case the the main salt had to be correct for the current Moodle. This was in Moodle 2.6.
Re: Problem with imported users and password salting from previous site
by AL Rachels -
Number of replies: 0