where('email', $value)->first(); if ($holder === null) { return; } if (! $holder->trashed()) { // A living account: the stock unique message said all there // is to say. $fail('validation.unique')->translate(); return; } if ($holder->erase_after !== null) { $fail(__('This email address belongs to a deleted account that is scheduled for permanent erasure. The address becomes available on :date. To free it sooner, erase the account with the projectsend:erase-account console command.', [ 'date' => $holder->erase_after->toFormattedDateString(), ])); return; } // Deleted before erasure scheduling existed, so no purge will ever // reach it — only the operator command can free the address. $fail(__('This email address belongs to a deleted account that has no erasure scheduled. Run the projectsend:erase-account console command to erase it and free the address.')); } }