mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
fix username validation
This commit is contained in:
parent
94f1aad3c5
commit
6fba6ef113
1 changed files with 1 additions and 1 deletions
|
@ -30,7 +30,7 @@ class RegistrationForm(FlaskForm):
|
|||
raise ValidationError(_('An account with this email address already exists.'))
|
||||
|
||||
def validate_user_name(self, user_name):
|
||||
user = User.query.filter_by(user_name=user_name.data).first()
|
||||
user = User.query.filter_by(user_name=user_name.data, ap_id=None).first()
|
||||
if user is not None:
|
||||
if user.deleted:
|
||||
raise ValidationError(_('This username was used in the past and cannot be reused.'))
|
||||
|
|
Loading…
Reference in a new issue