Beispiel #1
0
    def update_first_login_social_data(self, user: IUserModel, data: dict):
        """Set the initial data on the user model.

        :param user: User object.
        :param data: Normalized data.
        """
        super(TwitterMapper, self).update_first_login_social_data(user, data)
        if not user.full_name and data.get("name"):
            user.full_name = data["name"]
Beispiel #2
0
    def update_first_login_social_data(self, user: IUserModel, data: dict):
        """Update internal user data on every login.

        :param user: User object.
        :param data: Normalized data.
        """
        super(FacebookMapper, self).update_first_login_social_data(user, data)
        if not user.full_name and data.get("full_name"):
            user.full_name = data["full_name"]
Beispiel #3
0
    def activate_user(request, dbsession: Session, user: IUserModel):
        """Checks to perform when the user becomes a valid user for the first time.

        If this user has already started sign up process through email we need to cancel that.
        """
        user.activated_at = now()

        # Cancel any pending email activations if the user chooses the option to use social media login
        if user.activation:
            dbsession.delete(user.activation)
Beispiel #4
0
 def update_first_login_social_data(self, user: IUserModel, data: dict):
     super(TwitterMapper, self).update_first_login_social_data(user, data)
     if not user.full_name and data.get("name"):
         user.full_name = data["name"]
Beispiel #5
0
 def update_first_login_social_data(self, user: IUserModel, data: dict):
     super(TwitterMapper, self).update_first_login_social_data(user, data)
     if not user.full_name and data.get("name"):
         user.full_name = data["name"]