Jump to content

delete account


Guest krystal08

Recommended Posts

Guest krystal08

do you have an account somewhere that you wish to delete but you can't

because the only way to delete it is to ask to the administrator and he

don't want to delete it?me yes three!its really  :evil::x:evil::hehe::evil:  :rant:  :argue: me!

Link to comment
Share on other sites

The main issue with deleting accounts goes back to database theory. I'll try not to get too technical.

The majority of the text you see on your screen right now is stored in a MySQL database on the server, including this text. The database also stores your account information and the information about the boards as well as user permissions and other back-end things.

These things are stored in different tables in the database. Not everything is in the same table, or else it would be a complete inefficient mess. In fact, it probably wouldn't work at all.

For demonstration purposes, here is a very very very very simple fourm database:

Table Name: Users

User ID Username Password Hash
1 User_A jksjTRjkljklw234
2 User_B jksjTjkofadst342

Table Name: Posts

Post ID User ID Subject Message
1 1 Hello World! This is my very first post!
2 2 Re: Hello World! And this is my very first post!

In order to determine which user made the post, the User ID (which is automatically assigned to ensure uniqueness) is included in the table row of the post.

Most database systems support referential integrity, but SMF uses MyISAM tables, so it doesn't really. Referential Integrity means that it makes sure that the foreign keys, which are the shared columns (User ID in this case), exist and are the same in both tables. If I delete User_B, then something has to be done with User_B's post, because the User ID is shared between the two tables. Some systems delete the whole row. MyISAM-driven MySQL will put a NULL (empty) value in the User_ID Place. Notice that the value wasn't preserved.

Here is it in tabular form:

Table Name: Users

User ID Username Password Hash
1 User_A jksjTRjkljklw234

Table Name: Posts

Post ID User ID Subject Message
1 1 Hello World! This is my very first post!
2 NULL Re: Hello World! And this is my very first post!

This makes writing the software a little difficult, and some forum systems handle these conditions better than others.

If some of you remember, when I first got the forums back online after the loss of starfox-online.com, there were some very weird things happening with some of the longer threads involving missing posts. That was back during the phpbb days. That was caused by this same thing. Some of the shared columns had values missing in one table, and not the other.

Confusion is another reason why. It helps cut down on new account creations, as people tend to decide to come back after a while. It also makes the database do more work to allow creation and deletion of accounts willy-nilly. By making people contact admins, we can save some system resources.

These reasons are true on most sites and forums. Most sites use MyISAM-driven MySQL. Many use InnoDB-Driven MySQL as well, which supports true referential integrity. Some use PostgreSQL, which supports RI. Still others use M$SQL, which also supports RI. And yes, some also use M$ Access, which interestingly, supports RI as well.

FYI, We do have permissions set to allow self-deletion.

Link to comment
Share on other sites

Guest krystal08

thanks!i juste read it for the 3rd time and finnally

i understand all.Well,i'm glad to know why i still have

those accounts.

can it happen to delet only the post of a person?

i'm just curious.

Link to comment
Share on other sites

In the database, yes. With one line of SQL:


DELETE * FROM posts WHERE user_id = x;

x is the user ID.

I haven't really needed to, so I am not sure off the top of my head if SMF has a button to click.

Anyway, it is dangerous because it could potentially delete threads that you do not want to delete. Olny time i'd do it is if it was a serious troll.

For DB cleaning, SMF does pruning of old posts before a certain amount of time.

Link to comment
Share on other sites

×
×
  • Create New...