Added check for password reset from command line
This commit is contained in:
parent
f9d85a8028
commit
3cb78055ff
@ -228,7 +228,7 @@ class User(UserMixin, db.Model):
|
|||||||
db.session.rollback()
|
db.session.rollback()
|
||||||
write('system.log', f'Database error when updating user {self.get_username()}: {exception}')
|
write('system.log', f'Database error when updating user {self.get_username()}: {exception}')
|
||||||
return False, f'Database error: {exception}'
|
return False, f'Database error: {exception}'
|
||||||
_current_user = current_user.get_username() if current_user.is_authenticated else 'anonymous'
|
_current_user = 'command line' if not current_user else 'anonymous' if not current_user.is_authenticated else current_user.get_username()
|
||||||
write('system.log', f'Information for user {self.get_username()} has been updated by {_current_user}.')
|
write('system.log', f'Information for user {self.get_username()} has been updated by {_current_user}.')
|
||||||
if notify:
|
if notify:
|
||||||
message = Message(
|
message = Message(
|
||||||
|
Loading…
Reference in New Issue
Block a user