username in VL_sites

apexwebgaming

New Member
How are "username" created in VL_sites? What's the logic for numbering/naming?

I can see that the first site by an owner gets the same name as the owner, but what about the subsequent sites submitted by the owner. In my case, I'm getting:

top100arena
top100arena-41899
top100arena-81421

When I try to change the number following "-", I get an error.

I am trying to port over another toplist, so I need to somehow create these usernames on the fly, since my current site doesn't have the same naming convention.
 

cajkan

Active Member
I have few users with multiple domains, and they have different -numbers.

Probably its random number im not sure.
 

Basti

Administrator
Staff member
Yes these numbers behind used when you add another website from within the user control panel are random number. Owner is the main account holder, username is owner + number
That number is a max 4 digits

So if account 1 has just 1 website added his username and owner at the same time is "test" for example
if "test" adds another site, the username will be "test-3123" and the owner of this new site "test"

How are things on your site? If all is done via id ( numbers ), the first account gets username and owner simply that number. But i think on your site its completely different, having an account with name and then sites with id numbers.
 

apexwebgaming

New Member
Hello Basti, do you mean owner + 5 digits? In the db example above, I'm seeing 5-digits.

The thing is, when I go into the db and try to change the 5 digits, I couldn't access the page from the new username. Also, there seems to be a "password" per site/username. Is there some sort of checking that happens that prevents me from changing the username programmatically?

Yes, my site has accounts with ID and sites with IDs, so I'll need to map it into the new structure. I was thinking, would it make sense to have an import script whereby I post my old DB data directly to the script and it inserts the data into VL's DB. That way, all the integrity checks can be made.
 

Mark

Administrator
Staff member
be advised, the username is also stored in the stats table and in order to track stats properly these must match.

If your existing schema uses numeric ID's you will probably want to use those as the username so you can create a redirect to avoid forcing members to update their link code.

Also note that each account MUST have the owner field filled out in the VL_sites table, its very important this field is not blank.

there is a password for each member, this allows the admin to detach a site from a specific owner if needed.

yes you will need to create an import script to put the correct data in the correct places along the way.
 
Top