Needs review
Project:
Disable user language
Version:
7.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
4 Feb 2011 at 01:40 UTC
Updated:
9 Sep 2013 at 20:13 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Anonymous (not verified) commentedComment #2
Anonymous (not verified) commentedI changed the code.
hook_user_load()is not anymore used; the code instead useshook_init().Comment #4
mesr01 commented@kiam: Could you please provide a patch? Thanks in advance.
Comment #5
timofey commentedNeeds to be verified & committed.
Comment #6
mesr01 commented@kiam: The dev still triggers the error. Could you please provide a patch? Thanks in advance.
Comment #7
mesr01 commentedIn file dul.module, replace line 13 by
if (isset($form['locale']) && isset($form['#user']) && !user_access('change own user language', $form['#user'])) {and replace lines 41–45 by
Comment #8
henrijs.seso commentedIn patch format.
Comment #9
bennetteson commentedTo follow #1351924: Warning "Parameter 1 to dul_user_load() expected to be a reference" appears after module enabled, we shouldn't use references and follow hook_user_load | user.api.php | Drupal 7 | Drupal API.
Here a patch without the reference.
Comment #10
Anonymous (not verified) commentedActually, hook_user_load() cannot be used to alter values taken from the users table.
What the development snapshot does is using hook_init().
The alternative would be using a custom property that is loaded in
hook_user_load().I am changing the referred version, since bugs are fixed in the development snapshot.
Comment #11
Anonymous (not verified) commentedI am adding issue tags to this report.