ok...got it to work...here is how I did it using JSF...

Get the userModule through JNDI


  | 
  | userModule = (UserModule) new 
InitialContext().lookup("java:portal/UserModule");
  | 
  | 


Get the user by using its user id....NOT user name....

DO THIS


  | 
  | User test = userModule.findUserById(id);
  | 
  | 

DO NOT DO THIS


  | 
  | User test = userModule.findUserByUserName("admin");
  | 
  | 

I basically wrote a simple Hibernate service layer to get the user id after a 
email is given and the answer to the secret question is correct.

Then, create a new password and change it


  | 
  | test.updatePassword(newpassword);
  | 
  | 

Then fire an email off to the user with their new password. I used ...


  | 
  | Session session = (Session) new InitialContext().lookup("java:Mail");  
  | 
  | 

That is configured through the deploy/mail-service.xml file. The Forums Portlet 
uses the same service

POOF! I now have a self managed user password system...AKA..."Forgot My 
Password" link

Indy 

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4070663#4070663

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4070663
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to