in torque/src/java/org/apache/fulcrum/security/torque/TorqueAbstractUserManager.java [337:367]
public <T extends User> T getUserById(Object id) throws DataBackendException, UnknownEntityException {
T user;
if (id != null && id instanceof Integer) {
Connection con = null;
try {
con = Transaction.begin();
user = doSelectById((Integer) id, con);
// Add attached objects if they exist
((TorqueAbstractSecurityEntity) user).retrieveAttachedObjects(con, false); //
Transaction.commit(con);
con = null;
} catch (NoRowsException e) {
throw new UnknownEntityException("User with id '" + id + "' does not exist.", e);
} catch (TorqueException e) {
throw new DataBackendException("Error retrieving user information", e);
} finally {
if (con != null) {
Transaction.safeRollback(con);
}
}
} else {
throw new UnknownEntityException("Invalid user id '" + id + "'");
}
return user;
}