If a user has in the past created an account using Facebook Connect, but then tries to log in via the regular login block (presuming he/she has not added another password), we would like to give him/her a message that as a Facebook Connect user, he/she should use Facebook Connect to proceed. Anyone have an idea how this might be accomplished?

Comments

Dave Cohen’s picture

You'd have to, maybe, use hook_form_alter() to add a #validate function to the login form. But then the trick would be in your validate function to detect whether the user has connected to facebook before. By default, fb_user.module creates usernames like '12345@facebook', because facebook names are not unique but drupal names must be. So its doubtful the user you speak of would even know the right username.

fb_user.module will add a facebook connect button to the login form. You could implement your own hook_form_alter() to bring more attention to it. That's what I'd recommend.