id); } echo "Quan. de usarios processados: $count_user "; echo "
Quan. de usarios alerados: $count_change "; } function get_users_id(){ global $DB, $CFG; $sql="SELECT id FROM {$CFG->prefix}user WHERE id > 2"; $rows=$DB->get_records_sql($sql); return $rows; } function change_identity($useid){ global $DB; $dto= new object(); $dto->id=$useid; $dto->username="usuario$useid"; $dto->password=hash_internal_user_password("usuario$useid"); $dto->firstname="Usuario"; $dto->lastname="- $useid"; $dto->email="teste$useid@teste.com.br"; $dto->phone1=" "; $dto->phone2=" "; $dto->institution=" "; $dto->department=" "; $dto->address=" "; $dto->city=" "; $dto->picture=0; $dto->url=" "; $dto->description=" "; $dto->idnumber=" "; $resul=$DB->update_record('user', $dto); return $resul; } ?>