Re: TorqueUser synchronization problem
Thomas Vandahl <[email protected]> Wed, 11 Jan 2012 19:58:07 +0100
| Newsgroups | gmane.comp.jakarta.turbine.user |
|---|---|
| Message-ID | <[email protected]> |
Hi,
On 11.01.12 11:19, Weffen Cheung wrote:
> I have used turbine as my products for a few years, but i am not familiar with TorqueUser. When I modify some user data directly with jdbc, I found that the data in data.getUser() is still the old data, it cannot synchronize automatically.
>
> For example, I update user's email by this way:
>
> Connection conn = Torque.getConnection();
> conn.createStatement().executeUpdate("UPDATE turbine_user SET email='[email protected] WHERE huiyuan_id='1234'");
>
> But I found that the user(1234)'s email did not change until he logins again.
> I have to reload the TorqueUser in SessionValidator all the time. I think it is not a good solution. Is it there any good solution for that?
You can use data.getUser().setEmail("[email protected]") followed by a
data.getUser().save(). Is there any special reason for the separate
UPDATE statement?
Bye, Thomas.