We have a force.com site and we want to build a custom change password feature where users can change their password based on answering a security question. I found that site.changepassword method will only work if the user is logged in only and will not work for unauthenticated users even if we have the user enter a userid on a vf page. So i am trying to use System.setPassword method but it throws a permission error on the force.com site. Do you guys know what i need to do on the site settings to execute system methods on a force.com site? Thanks Buyan
1 Answer
I'm going to take a wild guess that maybe you solved your own problem, and posted it on your own website? :) Either that, or another guy name Buyan found the answer.
For anybody who stumbles on this, you'll probably find this helpful: http://betterapexprogramming.com/creating-a-custom-change-password-page-using-force-com-sites-and-solving-issues-with-dreaded-site-login-and-change-password/
Site.forgotPassword(username)
?