Don't crash emails settings when no email configured
Created by: eseliger
The assumption that
There is always exactly one primary email returned from the backend
is not correct, when a user is created through the API or the admin UI. They won't have any email and hence the UI crashed with an error. This fixes it.