Hi, this is a fantastic module but I have found a BUG, every time a user that doesn’t have permission to use the module saves there account I get an error in the log “error basic_webmail 12/06/2013 – 15:25 User Name”.

if I set “Use the user's account e-mail address and password for checking e-mail” I get a stream error.

If I edit the user as an Admin I get the error “E-mail account login field is required” on users that don't have permissions to use the module so shouldn’t be in there account.

Temporary FIX: using phpMyAdmin backup your database then go to your sites database users table and edit the user with the problem, in the data table remove the email address from basic_webmail_username and click GO, the user will now be able to save there own account again.

Thank You
Trexor

Comments

oadaeh’s picture

Status: Active » Fixed

I added a permission check around the code that does all that and pushed it to the dev version, here: http://drupalcode.org/project/basic_webmail.git/commit/4532a2a

Update to the 6.x-1.x-dev version, dated after 2012-Nov-20. If that works for you, I'll tag a 6.x-1.3 release.

Trexor’s picture

Version: 6.x-1.2 » 6.x-1.x-dev
Status: Fixed » Active

Hi oadaeh

I upgraded to 6.x-1.2+6-dev and got some warnings

warning: array_fill(): Number of elements must be positive in /websites/includes/database.inc on line 253.
warning: implode(): Invalid arguments passed in /websites/includes/database.inc on line 253.
warning: array_keys() expects parameter 1 to be array, null given in /websites/modules/user/user.module on line 528.
user warning: 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: SELECT p.perm FROM role r INNER JOIN permission p ON p.rid = r.rid WHERE r.rid IN () in /websites/modules/user/user.module on line 528.
The installed version of at least one of your modules or themes is no longer supported. Upgrading or disabling is strongly recommended! Please see the project homepage for more details. See the available updates page for more information.

I reinstalled 6.x-1.2 then added the version from the link and run update, I recived the folowing warnings.

warning: array_fill(): Number of elements must be positive in /websites/includes/database.inc on line 253.
warning: implode(): Invalid arguments passed in /websites/includes/database.inc on line 253.
warning: array_keys() expects parameter 1 to be array, null given in /websites/modules/user/user.module on line 528.
user warning: 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: SELECT p.perm FROM role r INNER JOIN permission p ON p.rid = r.rid WHERE r.rid IN () in /websites/modules/user/user.module on line 528.

I reinstalled 6.x-1.2 releases and run update no warnings but back where I started for now.

Thank You
Trexor

oadaeh’s picture

Status: Active » Fixed

I'm not getting that error.

If that is the result of the Basic webmail module, the user that is generating that error has no roles (the "()" in SELECT p.perm FROM role r INNER JOIN permission p ON p.rid = r.rid WHERE r.rid IN ()). They should have at least one role, either 'anonymous user' or 'authenticated user'.

oadaeh’s picture

Status: Fixed » Postponed (maintainer needs more info)

I didn't actually mean to mark it as fixed again just yet.

oadaeh’s picture

Status: Postponed (maintainer needs more info) » Fixed

Closing this, due to lack of response.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.