The sorting is applied to the database query so if you don't understand how the ORDER BY statement in a database query works then it's likely not behaving how you'd expect. Your usage would result in the following ORDER BY statement.
Code:
ORDER BY `avatar` DESC, `lastvisitDate` DESC, `registerDate` DESC
See the below in regards to ORDER BY in SQL.
dev.mysql.com/doc/refman/5.7/en/sorting-rows.html
The reason it's not working is because the first sorting on avatar is creating the first sub group. That sub group is then sorted by your other criteria. The problem with this is avatar tends to be unique per person there's no further sorting to be done. Instead you likely need to use the Advanced filtering usage since you just want to sort on whether they have an avatar or not and not on the actual value of the avatar column. The below should work for that.
Advanced
Code:
IF( `avatar` = '' OR `avatar` IS NULL, 0, 1 ) DESC, `lastvisitDate` DESC
Note registerDate sorting was removed as it's only going to be applied to users who've never logged in since the lastvisitDate sub group is unlikely to be the same for multiple users at once beyond those without a lastvisitDate. You could also use the below, but it maybe unreliable depending on the avatarapproved column value.
Basic
1: avatar (avatarapproved) - descending
2: lastvisitDate - descending