Hi, great module - exactly what I was looking for but a small problem.

Using core 6.19 on wamp setup (as you can see from the errors).

To reproduce, clean install (only additional modules are domain access, admin menu). I switched on domain access and configured a few test subdomains. I configured a few users with different sub-domain access permissions. Then switched on domain strict. I decided that domain strict didn't do what I wanted so decided that I needed your module. so installed that. Switched on the restrict domain login and then tested. When the user is authorised to view the domain everything is normal but when the user is not authorised to log into the pariticular sub-domain this happens:

warning: Parameter 2 to domain_bonus_login_restrict_user() expected to be a reference, value given in C:\wamp\www\SG\httpdocs\includes\module.inc on line 483.
warning: Parameter 3 to block_user() expected to be a reference, value given in C:\wamp\www\SG\httpdocs\includes\module.inc on line 483.
warning: Parameter 3 to comment_user() expected to be a reference, value given in C:\wamp\www\SG\httpdocs\includes\module.inc on line 483.
warning: Parameter 2 to dblog_user() expected to be a reference, value given in C:\wamp\www\SG\httpdocs\includes\module.inc on line 483.
warning: Parameter 2 to node_user() expected to be a reference, value given in C:\wamp\www\SG\httpdocs\includes\module.inc on line 483.
warning: Parameter 3 to system_user() expected to be a reference, value given in C:\wamp\www\SG\httpdocs\includes\module.inc on line 483.
warning: Parameter 2 to user_user() expected to be a reference, value given in C:\wamp\www\SG\httpdocs\includes\module.inc on line 483.
warning: Parameter 2 to domain_user() expected to be a reference, value given in C:\wamp\www\SG\httpdocs\includes\module.inc on line 483.
Sorry, unrecognized username or password. Have you forgotten your password?

The module performs as expected but would rather not have the errors ;-)
If I can help further let me know.

Thanks again,
Crom

CommentFileSizeAuthor
#8 ref_err-921894-8.patch815 bytesmonotaga

Comments

Crom’s picture

Just an additional, the error only occurs for me when the user is not authorised to view that sub-domain. If the user is not-recognised, I just get the standard 'sorry, unrecognised...' message.

Also, I have another install that I'm testing it on (Drupal Commons profile) and this works fine!

Crom’s picture

Looks like this is a php 5.3 issue as using php 5.2.11 reported no errors.

mvfavila’s picture

I realy don't know if this would be the correct solution for this problem but I commented the "module_invoke_all('user', 'logout', NULL, $user);" function call on line 75 from the domain_bonus_login_restrict.module file and the warnings messages stoped showing. The module continued to work fine.
I would like to know if doing this could bring any problems.

interx’s picture

It is a PHP 5.3 issue, it should be fixed like it's done in Drupal core (see http://drupal.org/node/360605):

Replace line 75

        module_invoke_all('user', 'logout', NULL, $user);

with :

        // Only variables can be passed by reference workaround.
        $null = NULL;
        user_module_invoke('logout', $null, $user);
interx’s picture

Status: Active » Needs review
afox’s picture

Priority: Normal » Major
Status: Needs review » Reviewed & tested by the community

Tested this and numerous same kind of PHP 5.3 fixes. Has been hanging around for too long. Should be committed asap. Please :)

Exploratus’s picture

#4 worked for me.

monotaga’s picture

StatusFileSize
new815 bytes

#4 as a patch.