Make sure the category child ids are an array before iterating.
Merge pull request #2269 from vanilla/hotfix/category-childids

Make sure the category child ids are an array before iterating.
Code style, don't access unassigned variables.
Make the auto-connect email check case-insensitive.

Since emails are case-insensitive in the database they should be case-insensitive as far as auto-connect is concerned.
Merge branch 'hotfix/case-insensitive-autoconnect' into stage

Conflicts:
	applications/vanilla/models/class.categorymodel.php