Open niranjans opened 8 years ago
I think we just need to do a PR to add an if statement to line 195 of meteor-admin/lib/both/startup.coffee to check if any emails are present before returning the address of the first one.
However, if you want a quick fix, I used the following hack (coffee script):
Meteor.startup ->
# Patch the way yogiben:admin renders users, to fix a bug where they are forced to have emails
emailColumn = AdminTables.Users.options.columns[1]
emailColumn.render = (value) ->
return value[0].address if value? and value[0]?
"No email"
thanks @tdenovan your workaround works well.
For those who need it in JS:
Meteor.startup(function () {
var emailCol = AdminTables.Users.options.columns[1];
emailCol.render = function(value){
return value && value[0] ? value[0].address : 'no email';
}
});
I placed it in lib/
any file
thanks, this is helpful. I hope it can be fixed
+1
This is related to this closed issue.
As some other users have pointed out, if the users without email address (Facebook logins) are removed or if dummy email is filled in, the Users collection shows data. Else, it does not show any data and this is the exception in the console:
Is there a way to fix this? I am trying to avoid adding dummy emails since that is not a good solution.