Currently, user must connect her Drupal account with Linkedin account.

When user is not registered, I need Drupal to show register form (similar to fbconnect module). I will work on this feature, and provide a patch here.

Unless somebody already implemented this?

Comments

kotnik’s picture

StatusFileSize
new3.17 KB

Ok, patch that you can find here can be applied to 6.x-1.x-dev of Linkedin module.

Basically, this patch makes registration with Linkedin possible. When you try to login with Linkedin account, if there is no user associated with that Linkedin account, one will see registration form and upon entering all required fields a new Drupal account will be created that is connected with Linkedin account.

davad’s picture

Thanks. This might be just what I need for a project I'm working on.

davad’s picture

Status: Active » Needs review
StatusFileSize
new2.69 KB

Looks good. I rerolled it so it can be applied from within the module's directory, and I removed the old line of code you commented out.

davad’s picture

Status: Needs review » Closed (fixed)

Committed the patch to git.

amrit_b’s picture

Why dosen't it creates a new user in Drupal and logs him in to the system as soon as you click in connect linkedin button?

@davad: Is it okay if I submit a patch for this?

Thx

shaneonabike’s picture

Status: Closed (fixed) » Needs work

Sorry to re-open this issue but this patch doesn't seem to work (if I should create a new issue I can do that sorry I don't know the protocol with that stuff).

Here are a few issues:

* The returned form is has no submit button in my usage
* You are setting $form['name']['#default_value'] = $data['name']; when there is no $data object

shaneonabike’s picture

Also I noticed in debugging that your call to drupal_prepare_form doesn't seem to work properly.

If you have content profile installed then it seems to sorta destroy the form and you lose the submit button. It's not clear to me why yet but I think it's due to a form_state value that is not being set.

PS - The only way to patch this was to literaly remove that prepare line and now I can actually submit and it works.

davad’s picture

@ShaneOnABike If this patch isn't working for you on an install with just drupal and this module, you are more than welcome to reopen this thread and post any information you find or patches you roll. If it looks like it's being caused by a conflict with another module, like the content profile, please open another thread with the relevant details and a link back to this one.

shaneonabike’s picture

@davad: Great! I have a solution that seems to be working for the most part. I need to change a few things b/c Content Profile is not getting called and I think it's a similiar issue to #761254: not working with content profile module ? or #277512: Using drupal_goto in form submit handler prevents the use of multiple submit handlers

I'll roll a patch and get back to you.