/** * Do subscriptions to all topics Called on user connection to add user to the subscribing user * list of all topics he has subscribed to (avoids database calls) * * <p>public void doSubscriptions() { for (String esid : eventTopicIds) { EventTopic eb = * ModelManager.get().getTopicById(esid); if (eb != null) { eb.addUser(this); } } } */ public void update() { User u = User.find("byId", this.id).first(); if (u != null) { u.email = email; u.password = password; u.name = name; u.gender = gender; u.mailnotif = mailnotif; u.facebookId = facebookId; u.googleId = googleId; u.twitterId = twitterId; u.avatarUrl = avatarUrl; u.connected = connected; u.eventTopicIds = eventTopicIds; u.save(); } }