Skip to content

Use the default formatting for the user object in logging, simpler is… - #6

Open
whyscream wants to merge 1 commit into
collective:masterfrom
fourdigits:fix-missing-property
Open

Use the default formatting for the user object in logging, simpler is…#6
whyscream wants to merge 1 commit into
collective:masterfrom
fourdigits:fix-missing-property

Conversation

@whyscream

Copy link
Copy Markdown

… better

When playing around with this plugin in a pristine Plone 4.3 install, I noticed that the username property does not exist for portal members. The missing property results in a ValueError which makes the plugin skip the second auth step despite having it enabled.

This change still logs the username, but in a more fault tolerant way.

@ale-rt

ale-rt commented Sep 27, 2019

Copy link
Copy Markdown
Member

I would suggest:

logger.debug("Found user: %r", user)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants