@@ -61,15 +61,6 @@ class Customer extends \Magento\Framework\Model\AbstractExtensibleModel
61
61
62
62
const XML_PATH_GENERATE_HUMAN_FRIENDLY_ID = 'customer/create_account/generate_human_friendly_id ' ;
63
63
64
- /**
65
- * Codes of exceptions related to customer model
66
- */
67
- const EXCEPTION_EMAIL_NOT_CONFIRMED = 1 ;
68
-
69
- const EXCEPTION_INVALID_EMAIL_OR_PASSWORD = 2 ;
70
-
71
- const EXCEPTION_INVALID_RESET_PASSWORD_LINK_TOKEN = 4 ;
72
-
73
64
const SUBSCRIBED_YES = 'yes ' ;
74
65
75
66
const SUBSCRIBED_NO = 'no ' ;
@@ -373,14 +364,12 @@ public function authenticate($login, $password)
373
364
$ this ->loadByEmail ($ login );
374
365
if ($ this ->getConfirmation () && $ this ->isConfirmationRequired ()) {
375
366
throw new \Magento \Framework \Exception \LocalizedException (
376
- __ ('This account is not confirmed. ' ),
377
- self ::EXCEPTION_EMAIL_NOT_CONFIRMED
367
+ __ ('This account is not confirmed. ' )
378
368
);
379
369
}
380
370
if (!$ this ->validatePassword ($ password )) {
381
371
throw new \Magento \Framework \Exception \LocalizedException (
382
- __ ('Invalid login or password. ' ),
383
- self ::EXCEPTION_INVALID_EMAIL_OR_PASSWORD
372
+ __ ('Invalid login or password. ' )
384
373
);
385
374
}
386
375
$ this ->_eventManager ->dispatch (
@@ -1262,8 +1251,7 @@ public function changeResetPasswordLinkToken($passwordLinkToken)
1262
1251
{
1263
1252
if (!is_string ($ passwordLinkToken ) || empty ($ passwordLinkToken )) {
1264
1253
throw new \Magento \Framework \Exception \LocalizedException (
1265
- __ ('Invalid password reset token. ' ),
1266
- self ::EXCEPTION_INVALID_RESET_PASSWORD_LINK_TOKEN
1254
+ __ ('Invalid password reset token. ' )
1267
1255
);
1268
1256
}
1269
1257
$ this ->_getResource ()->changeResetPasswordLinkToken ($ this , $ passwordLinkToken );
0 commit comments