ZywaveLabs / Retrospectre

MSOE SDL project.
http://retrospectre.zywave.com
MIT License
5 stars 2 forks source link

Extract out user info gathering #70

Open Awkewainze opened 8 years ago

Awkewainze commented 8 years ago

We have several instances in code like this

if(Meteor.user()){
    author = Meteor.user().profile.name;
} else {
    author = Session.get("author");
}

We should extract out a few "global" methods to something like: GetCurrentUserName(): Returns string of username, either alias or profile.name GetCurrentUserSignedIn(): Boolean of signed in with Google or alias GetCurrentUserAvatar(): Returns user's profile pic, or null if using alias UsersEqual(user1, user2): Takes in profile names or ids, and returns whether or not users are the same, as to determine if user is owner of card, etc...

Mainly just want to extract out a lot of this functionality

Awkewainze commented 8 years ago

Don't just close issues to close them... Like...come on man...