I notice that your module works for setting node language.

I think your module should as well work for setting up the user language as well, see: /admin/user/user as well as through VBO.

For example, for a multilingual site, it would be nice to assign a language to multiple users at the same time.

How hard would it be for you to create this feature?

Comments

Andrew Schulman’s picture

Assigned: Unassigned » Andrew Schulman

Hm, interesting idea. Probably not very hard. I'll look into it as soon as I can - I'll see if I can get something out over the weekend.

Andrew Schulman’s picture

I just committed a fix for this. Please try today's 6.x-1.x-dev build (it hasn't appeared yet, but it should later today, or you can check out the latest module code from CVS), and let me know if it works for you.

You should be able to set user languages both at admin/user/user, and in user bulk operations views with VBO. Note that with VBO, in order for the "Set language" operation to become available in your view, you'll have to first edit the view, click on the gear icon to edit the "bulk operations" style settings, check the box for "Set language", and save the view.

I've tested this at admin/user/user and in a VBO user view, and it works for me. I'd like to get confirmation from you though, before I release it.

Andrew Schulman’s picture

Status: Active » Needs review
xmacinfo’s picture

Thanks Andrew.

I shall be able to test the new version Monday.

xmacinfo’s picture

Status: Needs review » Needs work

@Andrew Schulman: It is tested (not with VBO yet, though) and it is working.

However, on all pages on the screen I get the following Warnings :

Warning: Call-time pass-by-reference has been deprecated in /var/www/html/drupal_apache/sites/all/modules/languageassign/languageassign.module on line 232

Warning: Call-time pass-by-reference has been deprecated in /var/www/html/drupal_apache/sites/all/modules/languageassign/languageassign.module on line 237

Looks like some deprecated code is used. I believe it needs a quick fix before doing an official release.

Andrew Schulman’s picture

Hm, that's odd since I didn't get that same error. However I'll look into it. What version of PHP are you using?

Please do test the VBO integration if you can. But I won't hold up the release for that.

Andrew Schulman’s picture

xmacinfo, I'm having a little connectivity trouble this morning, so I can't do my usual testing. However, if you wouldn't mind, would you please try editing languagassign.module and changing &$form_state to $form_state, on each of lines 232 and 237? That is, remove the ampersand character. Then try again and see if (1) the errors are gone, and (2) the user language assignment still works. Thanks, Andrew.

xmacinfo’s picture

However, if you wouldn't mind, would you please try editing languagassign.module and changing &$form_state to $form_state, on each of lines 232 and 237?

Done and the warnings are gone. And tested with /admin/user/user successfully.

VBO not tested yet. I shall test it in the next hour.

xmacinfo’s picture

OK, tested with VBO successfuly. I can now select a lot of users and change their language in batch.

I am not set up yet to create patches, here. But your changes on 232 and 237 did work.

Andrew Schulman’s picture

Status: Needs work » Reviewed & tested by the community

OK, great news. Don't worry about the patch. As soon as I can get access to my development server again, I'll upload the changes and make a new release.

Thanks for the feature suggestion and for testing.

Andrew Schulman’s picture

Status: Reviewed & tested by the community » Fixed

Fixed in 6.x-1.2. Sorry for the delay in getting it out.

Status: Fixed » Closed (fixed)

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