Topic: displaying deleted users posts...

how can i make it so that deleted user's posts are not deleted?

i had a look but i couldn't work it out... i know that the post dont get deleted, so i assume that there simply a query or if statement that needs changing.  could someone point me in the right direction please?

Thanks

MrBarby

Re: displaying deleted users posts...

oh, and i have another problem too...

my site uses the same usernames and passwords as the forums.  the weird thing is that this was working fine on my apache test server, but when i uploaded, as soon as you log into the forum the password gets changed.  i assumed that the passwords stored are md5 encrypted.  the odd thing is that the login works with the md5 password my sign up form generates and the new 'thing' that it gets replaced with.  however, you can no longer log into the main site.

anyone know what it is doing?

Re: displaying deleted users posts...

I don't get it. When you delete a users, his/her posts aren't deleted. That's what you asked for.

If you asked for the opposite, it's complicated. You have to delete the posts (and maybe topics) and update the search index for every post.

In regard to you second question, PunBB stores the password as an MD5 only if SHA1 hashes aren't available. If you've used the forum on a server with SHA1 support and then move it to a server without, you will not be able to login. You can request a new password via "Forget your password?" though.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: displaying deleted users posts...

k, yea, i think i saw that encryption stuff in functions.php

ill just remove the SHA1 stuff.  is there much point in encrypting in SHA1?

and about the deleted users.  at the moment, when i delete a user their posts are no longer displayed.  but i want to keep displaying the deleted users posts...

Re: displaying deleted users posts...

MrBarby wrote:

ill just remove the SHA1 stuff.  is there much point in encrypting in SHA1?

It is more difficult to brute force. A 6 character MD5 password hash takes only hours to brute force ([a-zA-Z0-9]). SHA1 is quite a bit harder.

MrBarby wrote:

and about the deleted users.  at the moment, when i delete a user their posts are no longer displayed.  but i want to keep displaying the deleted users posts...

Hmm, that's odd. Is this a problem with all guest posts? In that case, could you check what user-ID your Guest account has? SELECT id FROM users WHERE username='Guest';

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: displaying deleted users posts...

yes, sorry, i just realised what was wrong - i made a script to delete a user.  it just deleted the username row from the user table... i didn't realise that u had to set all their posts to guest for them to be displayed.

sorry about that...

thanks for your help - everything is working now smile