Jump to content

SubUser issue : really urgent


Recommended Posts

Hello

1 week ago maybe, i had an problem with my whmcs and had to migrate some database tables. Since i migrated, when a user creates an account he automatically passes user and get access to account of an other customer randomly.
He can spend the credit, use the services... of the users he has access to.

In summary, when a new account is created. It is added to someone else's without both people knowing. Maybe the problem comes from a table that I didn't migrate and which causes whmcs to link to the new IDs but IDs changed.

Thanks
 

bugwhmcs1.PNG

Link to comment
Share on other sites

43 minutes ago, MaxenceFIU said:

Hello

1 week ago maybe, i had an problem with my whmcs and had to migrate some database tables. Since i migrated, when a user creates an account he automatically passes user and get access to account of an other customer randomly.
He can spend the credit, use the services... of the users he has access to.

In summary, when a new account is created. It is added to someone else's without both people knowing. Maybe the problem comes from a table that I didn't migrate and which causes whmcs to link to the new IDs but IDs changed.

Thanks
 

bugwhmcs1.PNG

That is likely the case. My suggestion would be to make a new installation, and then compare all tables to your current installation to make sure they exist. Also, some tables might contain foreign keys which link the user ID in another table, if you just created the tables without the proper settings for each field that could also be the issue.

Link to comment
Share on other sites

  • WHMCS Support Manager

Hi @MaxenceFIU,

The WHMCS database contains many relational tables, which means that importing select tables into another installation's database is likely to cause this kind of behaviour. It is not recommended to modify the WHMCS database directly.

For example Users, Invoices, Services and more are related to Client Accounts, so importing only part of the data will be problematic and is not supported.

Link to comment
Share on other sites

  • WHMCS John changed the title to SubUser issue : really urgent
On 6/8/2022 at 5:10 PM, MaxenceFIU said:

Since i migrated, when a user creates an account he automatically passes user and get access to account of an other customer randomly.

The problem is that the IDs of the rows in the table start again at 1. To solve the problem you have to adjust the ID of the affected accounts (probably in tblusers) and then you must adjust the AUTO_INCREMENT value of the table so that newly assigned IDs are automatically higher than the previous ones.

However, I can't tell you exactly which tables you need to edit. Without insight into the current structure that would be a lot of guessing with multiple eventualities. If you are not familiar with the WHMCS database schema or don't have a good understanding of databases, it probably makes sense to import a working backup or contact an experienced database administrator.

Unless you have solved the problem already, I can also imagine that sooner or later even more serious problems will occur. Because if an ID already exists in the database, which would actually be the ID of the next entry, WHMCS will abort in the middle of the action. By "in the middle of an action" I mean for example the creation of a customer account. WHMCS does not really have an error handling for such errors, which will cause even more inconsistencies in the database. But yes, here I am already guessing - it all depends on the exact changes made.

Edited by string
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated