public static void addLinkedAccount(final AuthUser oldUser, final AuthUser newUser) { final User u = User.findByAuthUserIdentity(oldUser); u.linkedAccounts.add(LinkedAccount.create(newUser)); MorphiaObject.datastore.save(u); }
public static void setLastLoginDate(final AuthUser knownUser) { final User u = User.findByAuthUserIdentity(knownUser); u.lastLogin = new Date(); MorphiaObject.datastore.save(u); }
public static void merge(final AuthUser oldUser, final AuthUser newUser) { User.findByAuthUserIdentity(oldUser).merge(User.findByAuthUserIdentity(newUser)); }