want forgot password feature with lightning component in community i have seen many reference in visual force page but not able to find it in lightning, so how can i achieve it in lightning component
VisualForce:
Apex:
public class TestForgotController {
public String username {get; set;}
public PageReference forgotPassword() {
if(username != '') {
User UserToReset = [Select Id, Username from User where Username = :Username and IsActive = true LIMIT 1];
boolean success = Site.forgotPassword(username);
PageReference pr = Page.CommunityForgotPasswordConfirm;
pr.setRedirect(true);
return pr;
}
return null;
}
}
want same thing achieve in lightning component