function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Koustubh KulkarniKoustubh Kulkarni 

Forgot password Link to the community(via mail) returning wrong community URL?

I am new to salesforce. I have a community for my users in sandbox.Community is in the preview mode.The login to the community site is working just fine, i can login to the community with the test user's credentials.The problem is when a user forgets their password and tries to reset it. It sends an email to the user with the template assigned to the Forgot Password community setting. The email template includes the {!Community_URL} merge field. Ideally the email received contains a link to the page with some type of reset token as a parameter(your_community_domain/communitiy_name/login?c=TOKEN),and it should be redirected to the change password page. But When the user clicks on the above link, it gets redirected to the link (your_community_domain/communitiy_name/secur/forgotpassword.jsp?r=some token) which redirects to login page and thus there is no way for them to reset their password. Interesting thing is as community is in preview mode ideally it should not be sending any forgot password mails, but in this case it is sending mail with wrong url.

So what should I do to fix this issue? Any kind of help will be appreciated.Thanks.
Sheila PhillipsSheila Phillips
I'm running into same issue for my communities in Sandbox.  My situation is slighly different in that my communities are active instead of preview mode. The user reset process is working correctly if I access the password reset email link outside of my company network.  (I'm normally connected via VPN.)  For one community, we have a custom login page but the other site utilizes the standard out of the box community login page.  Same behavior for both sites.  Were you able to find a solution yet? 
Koustubh KulkarniKoustubh Kulkarni
Yeah my problem got fixed by activating the community. In your case i think there might be problem with IP restrictions. IS custom login page is VF page??
Joseph BundaJoseph Bunda

We have this problem too. We have a controller for user registration which is exhibiting two different problems:

1. We're using Site.createExternalUser (<user sObject>, <account ID>, <password>, <send email flag = false>). Despite setting the send email flag to false as per the documentation, an email is still sent to the user.

2. The email sent to the user after registration contains a link to the wrong community's login page.

The only workaround I can figure out is to send a custom email to the user, but the user is now receiving two emails upon registration. The one coming from Salesforce is incorrect and seemingly can't be disabled. The custom email is correct.

Any ideas?

Marco Pollastri 1Marco Pollastri 1
@Koustubh Kulkarni thansk for the post, I have the same issue, did you get by any chance the solution?
 
Deepak pal 9Deepak pal 9
I am running into the same problem any luck on this ?     new community member received  a mail and  on clicking the link it redirects to login  page not  allowing  the user to reset password.  any workaround for this ?
Carmen Nixon 5Carmen Nixon 5
Does anyone have any workaround for "Forgot Password?" functionality in Communities - we tried the email templates and url is not coming through. Any help would be really appreciated. 
Deepak pal 9Deepak pal 9
Hi Carmen 

Please  check if  API only is checked  in profile or any permission set assigned to the user under administrative Permissions  make sure to uncheck that  this worked in  in my case, let me know if this works for you.

Thanks
DeepakUser-added image
Evan ShueyEvan Shuey
Yeah this is still an issue for us. We use a custom controller that holds the "boolean success = Site.forgotPassword(username);." This controls the communiites forgot password page. But we have the same problem. The user is sent a message to reset the password, when they click to link they are just re-directed to the community login page. The only way for us to reset the passwords is by viewing their user record and reseting ourselves. Has anyone been able to figure this out? Salesforce Support couldnt help me. 
Richard William SwainRichard William Swain
There is a setting on the custom community profile that automatically expires the community url after sending. Try checking this - this will allow users to have a one time link that will only expire once they click 'reset password' on an intermediary page between receving the link and entering a new password.

User-added image