OpenID logins bypass T&Cs

sicjoy - November 27, 2007 - 23:24
Project:Legal
Version:6.x-2.2-beta4
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

Conflict with OpenID module: openid users are never shown the terms and conditions, yet they are credited as having accepted them automatically.

#1

sicjoy - November 28, 2007 - 01:51

One of the nice features of OpenID is that you don't have to fill out a form when you register with a website. Consequently, the registration form is skipped.

When OpenID users reach the 'insert' case in hook_user, legal executes the legal_save_accept function. If there were some way to test for OpenID registrations at this point, you could break out of this case before executing this function. Then OpenID users would be presented with the T&Cs at the login stage.

#2

sicjoy - February 2, 2008 - 08:19
Version:5.x-1.0» 5.x-1.3

The following patch solves the problem for me. If someone could test it that would be great.

AttachmentSize
legal+openid.patch 482 bytes

#3

sicjoy - February 2, 2008 - 08:22
Assigned to:Anonymous» sicjoy
Status:active» needs review

Oops, forgot to change the status.

#4

dpalfan - March 15, 2008 - 13:07

I'm ready to test it, but need the legal module updated to Drupal6.

#5

Robert Castelo - May 25, 2008 - 20:47
Version:5.x-1.3» 6.x-7.x-dev

Anyone want to try this out?

#6

Robert Castelo - August 3, 2008 - 08:46
Version:6.x-7.x-dev» 6.x-2.2-beta3

#2 patch doesn't add functionality required for OpenID to fully work with Legal module.

We need Legal to interrupt after the OpenID system has verified who the user is, during legal_user 'login' operation.

#7

sicjoy - August 6, 2008 - 04:08

I see you changed this bug to Drupal 6.x. Will the fix be back-ported to 5.x?

#8

Robert Castelo - August 8, 2008 - 21:28

It should be possible to take the relevant code from the D6 version and add it to the D5 version. We'll see.

#9

sicjoy - September 3, 2008 - 17:32
Version:6.x-2.2-beta3» 5.x-1.9
Status:needs review» active

Switching this bug back to active since the patch didn't work out.

#10

sicjoy - September 3, 2008 - 17:33
Assigned to:sicjoy» Anonymous

#11

rbryer - January 27, 2009 - 07:16

Any progress on this?

#12

jamesJonas - June 5, 2009 - 19:46
Version:5.x-1.9» 6.x-2.2-beta4

I'm also interested if anyone has found a fix for this issue.

#13

xibun - June 7, 2009 - 21:07

same here

#14

Delta Bridges - June 28, 2009 - 20:52

subscribing

#15

mfer - October 30, 2009 - 19:34

This legal problem isn't just for openid users. What about anonymous commenters with the legal module?

Here is my suggestion. Under the openid login and the comment area there is a space to have a message that says (by logging in with openid/commenting you are accepting the terms.) The terms is a link to the terms page. There could even be an option for a checkbox that fails the form if not checked asking them to accept the terms.

This would be fairly straight forward to put into code. Does the idea work?

Thoughts?

#16

dayre - November 11, 2009 - 05:02

This is also a problem for any bulk added users. We're bootstrapping a large user base using this module and by default they all had the terms accepted.

This is due to the hook_user insert operation which assumes if Drupal got to that point, the user has accepted... which may not be the case.

To solve this, and the openid issue, might be good to have some additional hook structure in there... for my problem, i solved it like this.

case 'insert':

        $conditions = legal_get_conditions();
        if (empty($conditions['conditions'])) return;

        $accepted = $edit['legal_accept'];
       
        $edit['legal_accept'] = NULL;

        ...
        ...

        // don't insert if there is no acceptance
        if ($accepted) {
            legal_save_accept($account->uid, $conditions['tc_id']);
        }

 
 

Drupal is a registered trademark of Dries Buytaert.