[Skip to main content](#vessel-content)

#   change user group mass action bug?

##

- **[pljuarez](/forum/user/34788-pljuarez "View pljuarez's Profile")**
- [![pljuarez's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/34788-pljuarez "View pljuarez's Profile") Topic Author
- [ Offline](/forum/user/34788-pljuarez)

Less More

- Posts: 79
- Thank you received: 3
-
-

11 years 8 months ago [\#194303](#194303) by [pljuarez](/forum/user/34788-pljuarez "View pljuarez's Profile")  *[change user group mass action bug?](/forum/33-customers/875613-change-user-group-mass-action-bug#194303 "-- HikaShop version -- : Business: 2.3.5 -- Joomla version -- : 3.2.3 -- PHP version -- : 5.3.3 -- Error-message(debug-mod must be tuned on) -- : Controlled exception. Error message obtained at screen via hikashop&#95;display() function (see attached image)  I have a custom field in user table named user&#95;type Type Radio button 3 options: 1st: Value = Individual; Title = Individual (Default value) 2nd: Value = No&#95;VAT; Title = Company without VAT Number 3rd: Value = With&#95;VAT; Title = Company with VAT Number  I have a Joomla User group named Clients with 3 groups subordinated to it |— Registered |—|— Clients |—|—|— Company No VAT |—|—|— Company VAT |—|—|— Individual  I have Joomla User default group on registration set to Clients At Hikashop System-&gt;Configuration-&gt;Checkout-&gt;Login &amp; Registration-&gt;User group on registration, I tried both, Inherit and Clients and I obtained same results.  Here is the bug(?):  I created 3 user mass actions in order to change user group on registration depending on user&#95;type custom field value  Filters: User colum: user&#95;type = Individual/No&#95;VAT/With&#95;VAT Actions: Change user group: Replace Individual/Company No VAT/Company VAT  respectively.  I try folowing triggers: 1.- Before create/update user, results in nothing happend, user group is the default group, no change. 2.- After create/update user, results on: a)creation of user b)no activation email sent c)user group is the default group, no change d)Finally I get the following error message at screen (see error&#95;msg.jpg): &quot;SQL=DELETE FROM xhtml46542&#95;user&#95;usergroup&#95;map WHERE user&#95;id IN (Array)&quot;  Is this a bug or am I forgetting something?  Regards")* was created by *[pljuarez](/forum/user/34788-pljuarez "View pljuarez's Profile")*

-- HikaShop version -- : Business: 2.3.5
-- Joomla version -- : 3.2.3
-- PHP version -- : 5.3.3
-- Error-message(debug-mod must be tuned on) -- : Controlled exception.
Error message obtained at screen via hikashop_display() function (see attached image)

I have a custom field in user table named user_type
Type Radio button
3 options:
1st: Value = Individual; Title = Individual (Default value)
2nd: Value = No_VAT; Title = Company without VAT Number
3rd: Value = With_VAT; Title = Company with VAT Number

I have a Joomla User group named Clients with 3 groups subordinated to it
&#124;— Registered
&#124;—&#124;— Clients
&#124;—&#124;—&#124;— Company No VAT
&#124;—&#124;—&#124;— Company VAT
&#124;—&#124;—&#124;— Individual

I have Joomla User default group on registration set to Clients
At Hikashop System-&gt;Configuration-&gt;Checkout-&gt;Login &amp; Registration-&gt;User group on registration, I tried both, Inherit and Clients and I obtained same results.

Here is the bug(?):

I created 3 user mass actions in order to change user group on registration depending on user_type custom field value

Filters:
User colum: user_type = Individual/No_VAT/With_VAT
Actions:
Change user group: Replace Individual/Company No VAT/Company VAT

respectively.

I try folowing triggers:
1.- Before create/update user, results in nothing happend, user group is the default group, no change.
2.- After create/update user, results on:
a)creation of user
b)no activation email sent
c)user group is the default group, no change
d)Finally I get the following error message at screen (see error_msg.jpg): "SQL=DELETE FROM xhtml46542_user_usergroup_map WHERE user_id IN (Array)"

Is this a bug or am I forgetting something?

Regards

- [ ![error&#95;msg.jpg](/forum/attachment/23001) ](/forum/attachment/23001 "error&#95;msg.jpg") [ ](/forum/attachment/23001?download=1 "error&#95;msg.jpg")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMzLWN1c3RvbWVycy84NzU2MTMtY2hhbmdlLXVzZXItZ3JvdXAtbWFzcy1hY3Rpb24tYnVnP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

11 years 8 months ago [\#194347](#194347) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[change user group mass action bug?](/forum/33-customers/875613-change-user-group-mass-action-bug#194347 "-- HikaShop version -- : Business: 2.3.5 -- Joomla version -- : 3.2.3 -- PHP version -- : 5.3.3 -- Error-message(debug-mod must be tuned on) -- : Controlled exception. Error message obtained at screen via hikashop&#95;display() function (see attached image)  I have a custom field in user table named user&#95;type Type Radio button 3 options: 1st: Value = Individual; Title = Individual (Default value) 2nd: Value = No&#95;VAT; Title = Company without VAT Number 3rd: Value = With&#95;VAT; Title = Company with VAT Number  I have a Joomla User group named Clients with 3 groups subordinated to it |— Registered |—|— Clients |—|—|— Company No VAT |—|—|— Company VAT |—|—|— Individual  I have Joomla User default group on registration set to Clients At Hikashop System-&gt;Configuration-&gt;Checkout-&gt;Login &amp; Registration-&gt;User group on registration, I tried both, Inherit and Clients and I obtained same results.  Here is the bug(?):  I created 3 user mass actions in order to change user group on registration depending on user&#95;type custom field value  Filters: User colum: user&#95;type = Individual/No&#95;VAT/With&#95;VAT Actions: Change user group: Replace Individual/Company No VAT/Company VAT  respectively.  I try folowing triggers: 1.- Before create/update user, results in nothing happend, user group is the default group, no change. 2.- After create/update user, results on: a)creation of user b)no activation email sent c)user group is the default group, no change d)Finally I get the following error message at screen (see error&#95;msg.jpg): &quot;SQL=DELETE FROM xhtml46542&#95;user&#95;usergroup&#95;map WHERE user&#95;id IN (Array)&quot;  Is this a bug or am I forgetting something?  Regards")*

Hi,

Thanks for the report.
Please replace: Code:

$db-&gt;setQuery('DELETE FROM '.hikashop_table('user_usergroup_map',false).' WHERE user_id IN ('.$user_ids.')');

By: Code:

$db-&gt;setQuery('DELETE FROM '.hikashop_table('user_usergroup_map',false).' WHERE user_id IN ('.implode(',',$user_ids).')');

In the file "plugins/hikashop/massaction_user/massaction_user.php" function "onProcessUserMassActionchangeGroup()".

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMzLWN1c3RvbWVycy84NzU2MTMtY2hhbmdlLXVzZXItZ3JvdXAtbWFzcy1hY3Rpb24tYnVnP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[pljuarez](/forum/user/34788-pljuarez "View pljuarez's Profile")**
- [![pljuarez's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/34788-pljuarez "View pljuarez's Profile") Topic Author
- [ Offline](/forum/user/34788-pljuarez)

Less More

- Posts: 79
- Thank you received: 3
-
-

11 years 8 months ago [\#194454](#194454) by [pljuarez](/forum/user/34788-pljuarez "View pljuarez's Profile")  Replied by *[pljuarez](/forum/user/34788-pljuarez "View pljuarez's Profile")* on topic *[change user group mass action bug?](/forum/33-customers/875613-change-user-group-mass-action-bug#194454 "-- HikaShop version -- : Business: 2.3.5 -- Joomla version -- : 3.2.3 -- PHP version -- : 5.3.3 -- Error-message(debug-mod must be tuned on) -- : Controlled exception. Error message obtained at screen via hikashop&#95;display() function (see attached image)  I have a custom field in user table named user&#95;type Type Radio button 3 options: 1st: Value = Individual; Title = Individual (Default value) 2nd: Value = No&#95;VAT; Title = Company without VAT Number 3rd: Value = With&#95;VAT; Title = Company with VAT Number  I have a Joomla User group named Clients with 3 groups subordinated to it |— Registered |—|— Clients |—|—|— Company No VAT |—|—|— Company VAT |—|—|— Individual  I have Joomla User default group on registration set to Clients At Hikashop System-&gt;Configuration-&gt;Checkout-&gt;Login &amp; Registration-&gt;User group on registration, I tried both, Inherit and Clients and I obtained same results.  Here is the bug(?):  I created 3 user mass actions in order to change user group on registration depending on user&#95;type custom field value  Filters: User colum: user&#95;type = Individual/No&#95;VAT/With&#95;VAT Actions: Change user group: Replace Individual/Company No VAT/Company VAT  respectively.  I try folowing triggers: 1.- Before create/update user, results in nothing happend, user group is the default group, no change. 2.- After create/update user, results on: a)creation of user b)no activation email sent c)user group is the default group, no change d)Finally I get the following error message at screen (see error&#95;msg.jpg): &quot;SQL=DELETE FROM xhtml46542&#95;user&#95;usergroup&#95;map WHERE user&#95;id IN (Array)&quot;  Is this a bug or am I forgetting something?  Regards")*

Thanks Xavier, I tried your solution and error message didn't appear anymore, but Joomla group didn't change, still remain at default user group Clients (maybe you must check this behaviour for future versions).

Any way, I soved my problem tried another solution and I don't need to change the usergroup anymore.

Thanks and Regards

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMzLWN1c3RvbWVycy84NzU2MTMtY2hhbmdlLXVzZXItZ3JvdXAtbWFzcy1hY3Rpb24tYnVnP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

11 years 8 months ago [\#194464](#194464) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[change user group mass action bug?](/forum/33-customers/875613-change-user-group-mass-action-bug#194464 "-- HikaShop version -- : Business: 2.3.5 -- Joomla version -- : 3.2.3 -- PHP version -- : 5.3.3 -- Error-message(debug-mod must be tuned on) -- : Controlled exception. Error message obtained at screen via hikashop&#95;display() function (see attached image)  I have a custom field in user table named user&#95;type Type Radio button 3 options: 1st: Value = Individual; Title = Individual (Default value) 2nd: Value = No&#95;VAT; Title = Company without VAT Number 3rd: Value = With&#95;VAT; Title = Company with VAT Number  I have a Joomla User group named Clients with 3 groups subordinated to it |— Registered |—|— Clients |—|—|— Company No VAT |—|—|— Company VAT |—|—|— Individual  I have Joomla User default group on registration set to Clients At Hikashop System-&gt;Configuration-&gt;Checkout-&gt;Login &amp; Registration-&gt;User group on registration, I tried both, Inherit and Clients and I obtained same results.  Here is the bug(?):  I created 3 user mass actions in order to change user group on registration depending on user&#95;type custom field value  Filters: User colum: user&#95;type = Individual/No&#95;VAT/With&#95;VAT Actions: Change user group: Replace Individual/Company No VAT/Company VAT  respectively.  I try folowing triggers: 1.- Before create/update user, results in nothing happend, user group is the default group, no change. 2.- After create/update user, results on: a)creation of user b)no activation email sent c)user group is the default group, no change d)Finally I get the following error message at screen (see error&#95;msg.jpg): &quot;SQL=DELETE FROM xhtml46542&#95;user&#95;usergroup&#95;map WHERE user&#95;id IN (Array)&quot;  Is this a bug or am I forgetting something?  Regards")*

Hi,

Ok I will do more tests, but when I tested on my end the usergroup was correctly changed.
Thanks for the report.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMzLWN1c3RvbWVycy84NzU2MTMtY2hhbmdlLXVzZXItZ3JvdXAtbWFzcy1hY3Rpb24tYnVnP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.054 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
