User Profiles¶
FlaskBB exposes several interfaces, hooks and validators to customize user profile updates, as well as several implementations for these. For details on the hooks see Hooks
Change Sets¶
-
class
flaskbb.core.user.update.
UserDetailsChange
(birthday=<flaskbb.core.changesets.EmptyValue object>, gender=<flaskbb.core.changesets.EmptyValue object>, location=<flaskbb.core.changesets.EmptyValue object>, website=<flaskbb.core.changesets.EmptyValue object>, avatar=<flaskbb.core.changesets.EmptyValue object>, signature=<flaskbb.core.changesets.EmptyValue object>, notes=<flaskbb.core.changesets.EmptyValue object>)[source]¶ Object representing a change user details.
-
class
flaskbb.core.user.update.
PasswordUpdate
(old_password, new_password)[source]¶ Object representing an update to a user’s password.
Implementations¶
Services¶
-
class
flaskbb.user.services.update.
DefaultDetailsUpdateHandler
(db, plugin_manager, validators=NOTHING)[source]¶ Validates and updates a user’s details and persists the changes to the database.
-
class
flaskbb.user.services.update.
DefaultPasswordUpdateHandler
(db, plugin_manager, validators=NOTHING)[source]¶ Validates and updates a user’s password and persists the changes to the database.
Validators¶
Validates that the new email for the user isn’t currently registered by another user.
-
class
flaskbb.user.services.validators.
OldEmailMustMatch
[source]¶ Validates that the email entered by the user is the current email of the user.
-
class
flaskbb.user.services.validators.
EmailsMustBeDifferent
[source]¶ Validates that the new email entered by the user isn’t the same as the current email for the user.
-
class
flaskbb.user.services.validators.
PasswordsMustBeDifferent
[source]¶ Validates that the new password entered by the user isn’t the same as the current email for the user.
-
class
flaskbb.user.services.validators.
OldPasswordMustMatch
[source]¶ Validates that the old password entered by the user is the current password for the user.
-
class
flaskbb.user.services.validators.
ValidateAvatarURL
[source]¶ Validates that the target avatar url currently meets constraints like height and width.
Warning
This validator only checks the current state of the image however if the image at the URL changes then this isn’t re-run and the new image could break these contraints.