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

#   Why is the address not deleted on user delete?

##

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

Less More

- Posts: 114
- Thank you received: 4
-
-

12 years 3 months ago [\#168835](#168835) by [peteo](/forum/user/33887-peteo "View peteo's Profile")  *[Why is the address not deleted on user delete?](/forum/33-customers/870602-why-is-the-address-not-deleted-on-user-delete#168835 "-- url of the page with the problem -- : db -- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.3 -- PHP version -- : 5.4 -- Browser(s) name and version -- : FF30 -- Error-message(debug-mod must be tuned on) -- : none  When I delete a user in the Joomla user manager the row in hikashop&#95;user gets deleted too but the row in hikashop&#95;address stays there (although all fields are set to NULL). Why is that?  cheers")* was created by *[peteo](/forum/user/33887-peteo "View peteo's Profile")*

-- url of the page with the problem -- : db
-- HikaShop version -- : 2.3.2
-- Joomla version -- : 3.3
-- PHP version -- : 5.4
-- Browser(s) name and version -- : FF30
-- Error-message(debug-mod must be tuned on) -- : none

When I delete a user in the Joomla user manager the row in hikashop_user gets deleted too but the row in hikashop_address stays there (although all fields are set to NULL). Why is that?

cheers

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMzLWN1c3RvbWVycy84NzA2MDItd2h5LWlzLXRoZS1hZGRyZXNzLW5vdC1kZWxldGVkLW9uLXVzZXItZGVsZXRlP3RtcGw9bWFya2Rvd24=) 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)
-

12 years 3 months ago [\#168840](#168840) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Why is the address not deleted on user delete?](/forum/33-customers/870602-why-is-the-address-not-deleted-on-user-delete#168840 "-- url of the page with the problem -- : db -- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.3 -- PHP version -- : 5.4 -- Browser(s) name and version -- : FF30 -- Error-message(debug-mod must be tuned on) -- : none  When I delete a user in the Joomla user manager the row in hikashop&#95;user gets deleted too but the row in hikashop&#95;address stays there (although all fields are set to NULL). Why is that?  cheers")*

Hi,

I checked the code, and if the customer hasn't orders he's deleted and his addresses should be deleted too.
Actually I don't understand why the values are set to "NULL".

If no orders, deleted, else, unpublished. But we don't change the values.
Don't you have any plugin which could do this modification before our edition ?
A plugin based on the function "onBeforeAddressDelete()" or "onBeforeUserDelete()", ...

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

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

Less More

- Posts: 114
- Thank you received: 4
-
-

12 years 3 months ago [\#168904](#168904) by [peteo](/forum/user/33887-peteo "View peteo's Profile")  Replied by *[peteo](/forum/user/33887-peteo "View peteo's Profile")* on topic *[Why is the address not deleted on user delete?](/forum/33-customers/870602-why-is-the-address-not-deleted-on-user-delete#168904 "-- url of the page with the problem -- : db -- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.3 -- PHP version -- : 5.4 -- Browser(s) name and version -- : FF30 -- Error-message(debug-mod must be tuned on) -- : none  When I delete a user in the Joomla user manager the row in hikashop&#95;user gets deleted too but the row in hikashop&#95;address stays there (although all fields are set to NULL). Why is that?  cheers")*

... I don't have "onBeforeAddressDelete()" or "onBeforeUserDelete()", but I add the user address to the Hika address table with a Community Bilder auto action onAfterRegistration. That should not affect the way how the address row is deleted by your code, right?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMzLWN1c3RvbWVycy84NzA2MDItd2h5LWlzLXRoZS1hZGRyZXNzLW5vdC1kZWxldGVkLW9uLXVzZXItZGVsZXRlP3RtcGw9bWFya2Rvd24=) 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)
-

12 years 3 months ago [\#168920](#168920) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Why is the address not deleted on user delete?](/forum/33-customers/870602-why-is-the-address-not-deleted-on-user-delete#168920 "-- url of the page with the problem -- : db -- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.3 -- PHP version -- : 5.4 -- Browser(s) name and version -- : FF30 -- Error-message(debug-mod must be tuned on) -- : none  When I delete a user in the Joomla user manager the row in hikashop&#95;user gets deleted too but the row in hikashop&#95;address stays there (although all fields are set to NULL). Why is that?  cheers")*

Hi,

I don't know how Community Builder add the address to the user, if it create a hikashop user entry in the hikashop_user table too. That's maybe there that the problem is. Because we use the hikashop user id for the hikashop address table.

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

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

Less More

- Posts: 114
- Thank you received: 4
-
-

12 years 3 months ago [\#169024](#169024) by [peteo](/forum/user/33887-peteo "View peteo's Profile")  Replied by *[peteo](/forum/user/33887-peteo "View peteo's Profile")* on topic *[Why is the address not deleted on user delete?](/forum/33-customers/870602-why-is-the-address-not-deleted-on-user-delete#169024 "-- url of the page with the problem -- : db -- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.3 -- PHP version -- : 5.4 -- Browser(s) name and version -- : FF30 -- Error-message(debug-mod must be tuned on) -- : none  When I delete a user in the Joomla user manager the row in hikashop&#95;user gets deleted too but the row in hikashop&#95;address stays there (although all fields are set to NULL). Why is that?  cheers")*

I checked and the hika user table is not touched by CB. Hika has its own plugin to add users when a user gets created in Joomla. The CB plugin kicks in after the Hika plugin has added the new user and looks for user_id and user_cms_id in _hikashop_user and adds the corresponding address to _hikashop_address. I think the glitch cannot come from that place.

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

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86586
- Thank you received: 14325
-
-

12 years 3 months ago [\#169040](#169040) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Why is the address not deleted on user delete?](/forum/33-customers/870602-why-is-the-address-not-deleted-on-user-delete#169040 "-- url of the page with the problem -- : db -- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.3 -- PHP version -- : 5.4 -- Browser(s) name and version -- : FF30 -- Error-message(debug-mod must be tuned on) -- : none  When I delete a user in the Joomla user manager the row in hikashop&#95;user gets deleted too but the row in hikashop&#95;address stays there (although all fields are set to NULL). Why is that?  cheers")*

As Xavier said in his first message, the address won't be deleted if it is used for an order. So it probably explains why you still have the address while the user has been deleted.
Otherwise, it could also happen if the user synchronization plugin of HikaShop had been disabled.

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

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

Less More

- Posts: 114
- Thank you received: 4
-
-

12 years 2 months ago [\#169122](#169122) by [peteo](/forum/user/33887-peteo "View peteo's Profile")  Replied by *[peteo](/forum/user/33887-peteo "View peteo's Profile")* on topic *[Why is the address not deleted on user delete?](/forum/33-customers/870602-why-is-the-address-not-deleted-on-user-delete#169122 "-- url of the page with the problem -- : db -- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.3 -- PHP version -- : 5.4 -- Browser(s) name and version -- : FF30 -- Error-message(debug-mod must be tuned on) -- : none  When I delete a user in the Joomla user manager the row in hikashop&#95;user gets deleted too but the row in hikashop&#95;address stays there (although all fields are set to NULL). Why is that?  cheers")*

"the address won't be deleted if it is used for an order."
==&gt; I know, but there are no orders at all in my system yet, and even if it would not explain why all the columns for the address in question get overriden and are set to NULL

"user synchronization plugin of HikaShop had been disabled"
==&gt; it is enabled

so question remains, why is this happening?

cheers

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMzLWN1c3RvbWVycy84NzA2MDItd2h5LWlzLXRoZS1hZGRyZXNzLW5vdC1kZWxldGVkLW9uLXVzZXItZGVsZXRlP3RtcGw9bWFya2Rvd24=) 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)
-

12 years 2 months ago [\#169725](#169725) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Why is the address not deleted on user delete?](/forum/33-customers/870602-why-is-the-address-not-deleted-on-user-delete#169725 "-- url of the page with the problem -- : db -- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.3 -- PHP version -- : 5.4 -- Browser(s) name and version -- : FF30 -- Error-message(debug-mod must be tuned on) -- : none  When I delete a user in the Joomla user manager the row in hikashop&#95;user gets deleted too but the row in hikashop&#95;address stays there (although all fields are set to NULL). Why is that?  cheers")*

Hi,

Backend access to your website could help us to investigate this problem and find from where the problem come.
Thanks to send it via private message with the url of that topic.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMzLWN1c3RvbWVycy84NzA2MDItd2h5LWlzLXRoZS1hZGRyZXNzLW5vdC1kZWxldGVkLW9uLXVzZXItZGVsZXRlP3RtcGw9bWFya2Rvd24=) 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.066 seconds

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