Currently the user who wants to deauthorize the facebook app gets informed to set a password, irrespective if password is set or not. I would like to check if the user has already set the password, then he should be allowed to disconnect his account from Facebook or if not, he needs to set a password first.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

osopolar’s picture

Status: Active » Needs review
FileSize
1.97 KB

Patch attached.

Users who already have set their password don't have to bother about the current message and for all others it is more clear what to do first.

BTW: This also avoids the meaningless phrase "normal password":

you will no longer be able to use Facebook to log into this account and must use a normal password

quicksketch’s picture

Thanks, this looks pretty good to me. Two suggestions:

- Can't we already check if a user has a password by checking the $account object?
- In the second call to t(), move the <strong> tags outside the translated string, since it's now before and after the whole string rather than in the middle.

I'm not really sure about "normal password" vs. "Your Site Name password". I don't think the latter is any more clear than the former. Then again, I don't know if either phrase is going to be easy to understand anyway. In any case, it's an edge-case scenario and this new approach only shows the message when needed, so I don't think it matters too much exactly what it says. Hiding the message will save most users any confusion.

osopolar’s picture

fixes:

* use $account->pass.
* move the <strong> tags outside the translated string
* New message text: If deauthorized, you will no longer be able to use Facebook to log into this account and must use your username and password as set in your <a href="!profile_url">user profile settings</a>. ... now the user is able quickly verify/change his account settings before disconnecting the facebook account.

quicksketch’s picture

Excellent! I'll review this for commit when I'm next working on the module.