XMB Forum Software
Not logged in [Login - Register]
Go To Bottom

Printable Version  
Author: Subject: [New] Unable to delete members
DSD
Member
***




Posts: 10
Registered: 3-21-2016
Member Is Offline


[*] posted on 10-19-2018 at 04:57 AM
[New] Unable to delete members


Full Board URL: https://aerialband.000webhostapp.com/forum/
XMB Version: 1.9.11

Long story short. The hosting company I originally set a forum up on years ago managed to delete some of my files, disabled scripts, etc. (not sure why a paid hosting company would do this). I wanted to set this forum back up just to have it archived. I got it set back up and upgraded it as I had no idea what version I was running. Everything went smoothly in the upgrade.

After upgrading there are a lot of users that are pending first login. When I go to delete them. I get a popup asking if I want to delete them, I click 'ok' and they won't delete.

Any ideas on how to fix this?
View user's profile View All Posts By User
lottos
Administrator
********




Posts: 461
Registered: 6-3-2002
Member Is Offline

Mood: pass me a TimTam

[*] posted on 10-19-2018 at 10:14 PM


Not offhand...

then again, if it's a forum being archived, why do you need to do anything at all? :)



View user's profile View All Posts By User
Jenny Lee
Member
***




Posts: 36
Registered: 7-21-2017
Location: England, UK
Member Is Offline

Mood: Meh. :P

[*] posted on 10-20-2018 at 01:19 AM


"there are a lot of users that are pending first login"

Why not write a quick MySQL query to select all users and update their "lastvisit" field to the unix timestamp of the upgrade date?
By idea it should work.:cool:
View user's profile View All Posts By User
DSD
Member
***




Posts: 10
Registered: 3-21-2016
Member Is Offline


[*] posted on 10-21-2018 at 05:14 AM


Quote: Originally posted by lottos  
Not offhand...

then again, if it's a forum being archived, why do you need to do anything at all? :)


Because there is some good posts and members, I want to clean up the members that don't need to be members or are pending first login. It just looks bad.
View user's profile View All Posts By User
DSD
Member
***




Posts: 10
Registered: 3-21-2016
Member Is Offline


[*] posted on 10-21-2018 at 05:17 AM


Quote: Originally posted by Jenny Lee  
"there are a lot of users that are pending first login"

Why not write a quick MySQL query to select all users and update their "lastvisit" field to the unix timestamp of the upgrade date?
By idea it should work.:cool:


I had just thought about using a mysql query. But not sure how to write it as it's been a long time since I've done that.

Can anyone help to write a query to delete members by certain rows?



View user's profile View All Posts By User
lottos
Administrator
********




Posts: 461
Registered: 6-3-2002
Member Is Offline

Mood: pass me a TimTam

[*] posted on 10-21-2018 at 05:58 AM


Your member list shows 10 members... can't you just go into phpmyadmin, select the xmb_members table and delete the ones you don't want? Maybe the xmb member list doesn't list members that have never logged in.

Still, using phpmyadmin and selecting the members table will still show many you have in total?




View user's profile View All Posts By User
Jenny Lee
Member
***




Posts: 36
Registered: 7-21-2017
Location: England, UK
Member Is Offline

Mood: Meh. :P

[*] posted on 10-22-2018 at 12:09 AM


Quote: Originally posted by DSD  
Quote: Originally posted by Jenny Lee  
"there are a lot of users that are pending first login"

Why not write a quick MySQL query to select all users and update their "lastvisit" field to the unix timestamp of the upgrade date?
By idea it should work.:cool:


I had just thought about using a mysql query. But not sure how to write it as it's been a long time since I've done that.




If you would go for updating 'lastvisit' field for all users at once:
Code:
$db->query("UPDATE ".X_PREFIX."members SET lastvisit=".$db->time(time()));

P.S. You can add a custom unix based timestamp if you not fine with using $db->time(time());

Quote: Originally posted by DSD  


Can anyone help to write a query to delete members by certain rows?



The delete syntax depends on conditions you may want to apply, so I can't give an actual example. Check out the db/mysqli.php for query functions or you could do it manually trough phpmyadmin as lottos have suggested.
View user's profile View All Posts By User
DSD
Member
***




Posts: 10
Registered: 3-21-2016
Member Is Offline


[*] posted on 10-24-2018 at 09:43 PM


I figured out part of the problem with deleting members.

The hosting I was using (000webhostapp.com) which I was using to get things cleaned up and working again so I could move it to a more permanent site. I'm assuming they don't allow deleting rows in the mysql database, I wasn't able to delete them by checking the boxes and doing a multiple delete. Since I did have the upgrade done and all I need to do is delete most of the members I moved the forum.

The permanent hosting allows for multiple deleting of rows in the mysql database. But, I'm wondering if there is something that needs fixed in XMB Forum code to be able to delete those members from the admin panel? Just wondering why I can't delete members from the admin panel and have to delete using myphpadmin?
View user's profile View All Posts By User
lottos
Administrator
********




Posts: 461
Registered: 6-3-2002
Member Is Offline

Mood: pass me a TimTam

[*] posted on 10-24-2018 at 11:03 PM


Quote: Originally posted by DSD  
But, I'm wondering if there is something that needs fixed in XMB Forum code to be able to delete those members from the admin panel? Just wondering why I can't delete members from the admin panel and have to delete using myphpadmin?


Hi, this has been confirmed as a bug and added to the bugtracker:
https://bugs.xmbforum2.com/view.php?id=539




View user's profile View All Posts By User
DSD
Member
***




Posts: 10
Registered: 3-21-2016
Member Is Offline


[*] posted on 10-25-2018 at 02:32 AM


Quote: Originally posted by lottos  


Hi, this has been confirmed as a bug and added to the bugtracker:
https://bugs.xmbforum2.com/view.php?id=539


Thank you!

About how long does it usually take for bugs to get fixed? Just wondering...
View user's profile View All Posts By User
DSD
Member
***




Posts: 10
Registered: 3-21-2016
Member Is Offline


[*] posted on 10-25-2018 at 03:35 AM


Just a thought on not being able to delete members pending first login. It has something to do with in the coding somewhere that members pending first login aren't really considered members because they are 'pending first login'. When I go to the member list only the members that have logged in previously are there. Although, on the admin panel it lists them as members. There is something in the code that won't allow for deletion of 'pending first login' members.

I tested this by registering a new user and logging in. I was able to delete the member that was not pending first login.

If I knew more about coding I could probably figure out how to fix it. But, it has been a long time since I've messed with coding. I remember enough to figure things out and have an idea of how things should work. It's probably been at least 10 years since I've written any php coding. I wrote a hack/mod for XMB way back then.
View user's profile View All Posts By User
lottos
Administrator
********




Posts: 461
Registered: 6-3-2002
Member Is Offline

Mood: pass me a TimTam

[*] posted on 10-25-2018 at 05:25 AM


Quote: Originally posted by DSD  

I tested this by registering a new user and logging in. I was able to delete the member that was not pending first login.


I'm curious as to whether this would work if you had created multiple [at least 2] new users and then tried the multiple delete. It could be that single deletes work [haven't tested this].



View user's profile View All Posts By User
Jenny Lee
Member
***




Posts: 36
Registered: 7-21-2017
Location: England, UK
Member Is Offline

Mood: Meh. :P

[*] posted on 10-25-2018 at 07:42 PM


@DSD, did you run the MySQL query I gave you? It fixes your problem 100%. I tested it on my sandbox forum. Every user registered would show up in active members list as their lastlogin timestamp would get updated globally which means no more popups to delete 'inactive users'. Until the bug is resolved that serves as a valid workaround.

Just create a php file in your forum dir and use example provided. In my case it was poo.php

File example:
code.jpg - 283kB
https://pastebin.com/t41Cqif1
Once it's ran:
how it looks once it done.JPG - 106kB

P.S. Any date value would do . If lastvisit value is 0 user is being treated as never logged in and thus hidden from members lists.

Once you dealt with the users you should get rid of login for non admins and you are good to go. Your forum is archived and locked.
View user's profile View All Posts By User

  Go To Top

Powered by XMB 1.9.12 (Debug Mode)
XMB Forum Software © 2001-2024 The XMB Group
[Queries: 16] [PHP: 52.1% - SQL: 47.9%]