mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
Fix param to send user the forgot password email
This commit is contained in:
@@ -537,7 +537,7 @@ describe('EPersonFormComponent', () => {
|
||||
});
|
||||
|
||||
it('should call epersonRegistrationService.registerEmail', () => {
|
||||
expect(epersonRegistrationService.registerEmail).toHaveBeenCalledWith(ePersonEmail, null, 'register');
|
||||
expect(epersonRegistrationService.registerEmail).toHaveBeenCalledWith(ePersonEmail, null, 'forgot');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@@ -36,7 +36,7 @@ import { followLink } from '../../../shared/utils/follow-link-config.model';
|
||||
import { ValidateEmailNotTaken } from './validators/email-taken.validator';
|
||||
import { Registration } from '../../../core/shared/registration.model';
|
||||
import { EpersonRegistrationService } from '../../../core/data/eperson-registration.service';
|
||||
import { TYPE_REQUEST_REGISTER } from '../../../register-email-form/register-email-form.component';
|
||||
import { TYPE_REQUEST_FORGOT } from '../../../register-email-form/register-email-form.component';
|
||||
|
||||
@Component({
|
||||
selector: 'ds-eperson-form',
|
||||
@@ -492,7 +492,7 @@ export class EPersonFormComponent implements OnInit, OnDestroy {
|
||||
*/
|
||||
resetPassword() {
|
||||
if (hasValue(this.epersonInitial.email)) {
|
||||
this.epersonRegistrationService.registerEmail(this.epersonInitial.email, null, TYPE_REQUEST_REGISTER).pipe(getFirstCompletedRemoteData())
|
||||
this.epersonRegistrationService.registerEmail(this.epersonInitial.email, null, TYPE_REQUEST_FORGOT).pipe(getFirstCompletedRemoteData())
|
||||
.subscribe((response: RemoteData<Registration>) => {
|
||||
if (response.hasSucceeded) {
|
||||
this.notificationsService.success(this.translateService.get('admin.access-control.epeople.actions.reset'),
|
||||
|
Reference in New Issue
Block a user