Skip to content

Commit

Permalink
Step 10.7: Implemented emailLocalPart
Browse files Browse the repository at this point in the history
  • Loading branch information
dotansimha authored and Dotan Simha committed Nov 22, 2016
1 parent 036587b commit 1633737
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion client/imports/main.component.ts
Expand Up @@ -38,6 +38,13 @@ export class MainComponent implements OnInit {
}

get userEmail() {
return "";
if (Meteor.user()) {
const email = Meteor.user().emails[0].address;

return email.substring(0, email.indexOf('@'));
}
else {
return "";
}
}
}

0 comments on commit 1633737

Please sign in to comment.