Git commits in Moodle 3.0.8 by Frederic Massart

commit fe5264217df4e956ee26f29f56bcfd2b55e8db22
Author: Frederic Massart <fred@moodle.com>
Date:   Fri, 02 Dec 2016 16:02:00 +0800
Tag:    v3.0.8

MDL-57193 auth_db: Flip the array outside the loop for better perf