* @throws Exception
*/
public UserDetail createUser(UserForm user, HttpServletRequest request) throws Exception {
IUserDetails userDetails = (IUserDetails) ServiceFinder.getContext(request).getBean("UserDetailsHibernateDao");
try {
UserDetail userDetail = new UserDetail();
userDetail.setUserName(user.getUserName());
userDetail.setPassword(user.getPassword());
userDetail.setFirstName(user.getFirstName());
userDetail.setLastName(user.getLastName());
userDetail.setGender(user.getGender());
userDetail.setUserType("USER");
userDetail.setEmail(user.getEmail());
userDetails.save(userDetail);
return userDetails.getUserDetailByUserName(user.getUserName());
}catch (Exception ex){
throw new EmployeeException(ex);
}