Author |
Message |
m2fnuke
New Member


Joined: Apr 14, 2004
Posts: 14
|
Posted:
Fri Jun 18, 2004 8:32 am |
|
how does forums handle deleted users in Nuke??
my understanding was it defaults to Anonymous..
it didn't happen, so here is the env..
1. site is for registered users only..so forums are visible to reg users only
2. in includes/contant.php, I changed define('DELETED', -1); to define('DELETED', 152); where 152 is a user_id whom I want to own all the posts od deleted users..
3. when I delete a user in Nuke, the forums are not displaying the deleted user posts..now, they are supposed to be owned by postername with userid 152 ?? am I missing something??
how does and where is the code which handles the deleted users posts??
thanks in advance |
|
|
|
 |
Raven
Site Admin/Owner

Joined: Aug 27, 2002
Posts: 17088
|
Posted:
Fri Jun 18, 2004 8:36 am |
|
That is correct. Whenever you delete a userid, the forum logic can no longer match the posterid to the userid so it does not (cannot) display the posts. I would try creating a new user with the name DELETED. Then use phpMyAdmin to go into the user table and modify the user_id to 152. |
|
|
|
 |
m2fnuke

|
Posted:
Fri Jun 18, 2004 11:05 am |
|
Raven wrote: | That is correct. Whenever you delete a userid, the forum logic can no longer match the posterid to the userid so it does not (cannot) display the posts. I would try creating a new user with the name DELETED. Then use phpMyAdmin to go into the user table and modify the user_id to 152. |
am a bit confused now:-)
here is what I did..and please correct me if something is amiss..
1. I have a bunch of users deleted in Nuke..their posts still remain in the tables and point to their user_id but no postername (that is expected)..
2. then I created a username DELETED and made sure it's user_id is 152
3. when I go back and look in forums, I still don't get the visibility to the posts originally owned by those deleted users..
so my question is how do I make the deleted users posts visible even after they no longer have an account??
I tried with default define (DELETED, -1) , no luck either..
thanks for any insight.. |
|
|
|
 |
m2fnuke

|
Posted:
Mon Jun 21, 2004 3:27 pm |
|
in /admin/modules/user.php
the code handling the delete users..
Code:
case "delUser":
include("header.php");
GraphicAdmin();
OpenTable();
echo "<center><font class=\"title\"><b>" . _USERADMIN . "</b></font></center>";
CloseTable();
echo "<br>";
OpenTable();
echo "<center><font class=\"option\"><b>" . _DELETEUSER . "</b></font><br><br>"
."" . _SURE2DELETE . " $chng_uid?<br><br>"
."[ <a href=\"admin.php?op=delUserConf&del_uid=$chng_uid\">" . _YES . "</a> | <a href=\"admin.php?op=mod_users\">" . _NO . "</a> ]</center>";
CloseTable();
include("footer.php");
break;
case "delUserConf":
$db->sql_query("delete from " . $user_prefix . "_users where username='$del_uid'");
Header("Location: admin.php?op=adminMain");
break;
|
and in /modules/Forums/admin/admin_users.php
the code handling the delete user stuff..
Code:
if( $HTTP_POST_VARS['deleteuser'] )
{
$sql = "SELECT g.group_id
FROM " . USER_GROUP_TABLE . " ug, " . GROUPS_TABLE . " g
WHERE ug.user_id = '$user_id'
AND g.group_id = ug.group_id
AND g.group_single_user = '1'";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain group information for this user', '', __LINE__, __FILE__, $sql);
}
$row = $db->sql_fetchrow($result);
$sql = "UPDATE " . POSTS_TABLE . "
SET poster_id = " . DELETED . ", post_username = '$username'
WHERE poster_id = '$user_id'";
if( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not update posts for this user', '', __LINE__, __FILE__, $sql);
}
$sql = "UPDATE " . TOPICS_TABLE . "
SET topic_poster = " . DELETED . "
WHERE topic_poster = '$user_id'";
if( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not update topics for this user', '', __LINE__, __FILE__, $sql);
}
......
.....
|
as u can see, the delete user called from "Edit Users" does not have or call any of the admin_users.php deleteuser..
not knowing enough of how the Nuke/PhpBB integration works/done..is this by desgin or left out stuff??/
I guess, the ugly way of fixing the users deleted from
nuke and their posts is to hardcode these admin_users.php stuff into users.php??
any pointers??
TIA |
|
|
|
 |
dcasmr
Worker


Joined: Feb 06, 2004
Posts: 147
|
Posted:
Wed Apr 26, 2006 1:40 am |
|
Raven wrote: | That is correct. Whenever you delete a userid, the forum logic can no longer match the posterid to the userid so it does not (cannot) display the posts. I would try creating a new user with the name DELETED. Then use phpMyAdmin to go into the user table and modify the user_id to 152. |
Interesting. I have a situation where I am trying to get a post message in nuke_bbpost_text appear in the forums. The message is there, but on the forum it does not show. I know the post_id, the post_username, and I have a user_id numbered 55 that I would like to tie to the post.
On a side note, when someone reply to that forum we get the error message "No post for such topic"?
Thanks,
dcasmr |
|
|
|
 |
montego
Site Admin

Joined: Aug 29, 2004
Posts: 9457
Location: Arizona
|
Posted:
Wed Apr 26, 2006 6:42 am |
|
Personally, if you are going to delete a user from Nuke, use nuke's User feature to do it. I have modified the code recently to take of NSN Groups for RavenNuke76 and that function is taking care of ALL of the places within nuke that use a user_id. Since the phpBB user delete is not "Nuke Aware", it would not change everything that would need to (I am making an assumption here as I have not looked at the phpBB code, but based on what I am seeing in the forums here, I think it to be a good assumption). |
_________________ Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! |
|
|
 |
|