Hi Tom. That's what I'm currently doing, a validatePasswordChange() method in the service. As it is passed 3 password fields and a User object it just feels wrong. As well as comparing an encrypted and salted password entered in the form with the getPassword() return of the User, it also uses the User for a validatePasswordStrength() that also smells as it takes a password arg instead of using an instance variable. Only then it sets setPassword() in the User and runs User.save().
It just needs a good sorting out :-) It works so not a huge problem, just a refactoring exercise needed sooner rather than later. Alan ----- Original Message ---- From: Tom Chiverton <[EMAIL PROTECTED]> To: [email protected] Sent: Monday, October 20, 2008 12:29:27 PM Subject: [CFCDEV] Re: User password changes and OO confusion On Sunday 19 Oct 2008, Alan Livie wrote: > c) keep these out of User and put in another object, either the > service or another suitable bean. A user has-a password (only one !). When you are changing it, the service could take a User and the new password(s) and do the validation there i.e. it'll probably have (at least) 3 parameters. -- Tom Chiverton **************************************************** This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office. Any reference to a partner in relation to Halliwells LLP means a member of Halliwells LLP. Regulated by The Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CFCDev" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cfcdev?hl=en -~----------~----~----~----~------~----~------~--~---
