Hello,

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?






configuration of  my app as the following:

services.SecurityService.user.class=com.supermodel.turbine.security.CmwUser
services.SecurityService.group.class =      
org.apache.turbine.services.security.torque.TorqueGroup
services.SecurityService.permission.class = 
org.apache.turbine.services.security.torque.TorquePermission
services.SecurityService.role.class =       
org.apache.turbine.services.security.torque.TorqueRole 

and the CmwUser is the following:

public class CmwUser extends TorqueUser {
        private static final long serialVersionUID = 1L;

        public CmwUser() {
                super();
        }

        public CmwUser(Persistent obj) {
                super(obj);
        }

        public void reload() throws NoRowsException, TooManyRowsException,
                        TorqueException {
                if (obj != null) {
                        obj = HuiyuanPeer.retrieveByPK(((Huiyuan) 
obj).getHuiyuanId());
                }

        }
}



--
Weffen Cheung
E: [email protected]
M: 13802222618



Reply via email to