def execute(self): user = User.get_by_id(self.user_id) user_detail = UserDetail.create_from_user(user) return user_detail
def execute(self): user = User.get_by_user_name(self.user_name.lower()) user_detail = None if user: user_detail = UserDetail.create_from_user(user, include_password=True) return user_detail