mirror of
https://github.com/wekan/wekan.git
synced 2025-09-22 01:50:48 +02:00
20 lines
430 B
JavaScript
20 lines
430 B
JavaScript
![]() |
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";
|
||
|
}
|
||
|
}
|
||
|
};
|