From 73e265d8fd050ae3daa67472b4465a5c49d68910 Mon Sep 17 00:00:00 2001 From: Lauri Ojansivu Date: Sat, 20 Apr 2019 15:18:33 +0300 Subject: Include to Wekan packages directory contents, so that meteor command would build all directly. This also simplifies build scripts. Thanks to xet7 ! --- packages/meteor-useraccounts-core/lib/utils.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 packages/meteor-useraccounts-core/lib/utils.js (limited to 'packages/meteor-useraccounts-core/lib/utils.js') diff --git a/packages/meteor-useraccounts-core/lib/utils.js b/packages/meteor-useraccounts-core/lib/utils.js new file mode 100644 index 00000000..30b108ca --- /dev/null +++ b/packages/meteor-useraccounts-core/lib/utils.js @@ -0,0 +1,19 @@ +capitalize = function(str) { + return str.charAt(0).toUpperCase() + str.slice(1); +}; + +signedInAs = function() { + var user = Meteor.user(); + + if (user) { + if (user.username) { + return user.username; + } else if (user.profile && user.profile.name) { + return user.profile.name; + } else if (user.emails && user.emails[0]) { + return user.emails[0].address; + } else { + return "Signed In"; + } + } +}; -- cgit v1.2.3-1-g7c22