legal doesn't work with securesite

ray007 - May 25, 2007 - 15:52
Project:Legal
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

Not sure why, but when securesite is active and i change the conditions for legal, normal user cannot login anymore.
There are some errors to be found in the log:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1 query: user_access SELECT DISTINCT(p.perm) FROM role r INNER JOIN permission p ON p.rid = r.rid WHERE r.rid IN () in /www/htdocs/drupaldir/includes/database.mysql.inc in Zeile 172.
implode() [<a href='function.implode'>function.implode</a>]: Bad arguments. in /www/htdocs/drupaldir/modules/user/user.module in Zeile 361.
array_keys() [<a href='function.array-keys'>function.array-keys</a>]: The first argument should be an array in /www/htdocs/drupaldir/modules/user/user.module in Zeile 361.

The whole seems to get triggered by calling module_invoke_all('user', 'logout', NULL, $user); in hook legal_user() (legal.module line 518).

#1

Robert Castelo - January 12, 2008 - 14:20

I've run into that problem as well.

Don't have time to fix this problem, but will update the documentation to make it known that there's a conflict.

#2

wotstheguts - March 7, 2008 - 06:09

Hi,

Yes this can have quite an impact. I inadvertently locked out all my beta testers when I made a small change to the terms and conditions!

Just to help anyone else who comes across this, to re-allow users to login with Securesite enabled, you need to login as Admin and go back to the admin/settings/legal page and note down the Current Version.

Then, using a database editor such as DBTools, open the database table legal_accepted and change the tc_id field for all users to the Current Version. They should then be able to login with Securesite.

Then DON"T CHANGE your terms and conditions until there is a patch, or until you stop using Securesite!

Cheers,
Peter.

#3

javierreartes - October 14, 2009 - 20:35

Hi, I installed your module in a site using securesite and didn't have any issue, the versions I installed are Legal 6.x-2.2-beta4 and Secure Site 6.x-2.4

I saw the notice in this project homepage so I did the following test:

1- downloaded and installed legal and checkbox_validate
2- in legal conf, choose "Page Link" as display style and wrote some t&c
3- created user account and logged in
4- as admin changed the t&c
5- log out with the previous user and logged in again

The result was that the second time I log in with the regular user I got prompted to accept the t&c again without problems.
Maybe this issue affects only to D5 or older releases?

 
 

Drupal is a registered trademark of Dries Buytaert.