DSD
Member
Posts: 11
Registered: 3-21-2016
Member Is Offline
|
|
[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?
|
|
lottos
Administrator
Posts: 479
Registered: 6-3-2002
Member Is Offline
Mood: pass me a TimTam
|
|
Not offhand...
then again, if it's a forum being archived, why do you need to do anything at all?
|
|
Jenny Lee
Member
Posts: 36
Registered: 7-21-2017
Location: England, UK
Member Is Offline
Mood: Meh.
|
|
"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.
|
|
DSD
Member
Posts: 11
Registered: 3-21-2016
Member Is Offline
|
|
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.
|
|
DSD
Member
Posts: 11
Registered: 3-21-2016
Member Is Offline
|
|
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. |
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?
|
|
lottos
Administrator
Posts: 479
Registered: 6-3-2002
Member Is Offline
Mood: pass me a TimTam
|
|
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?
|
|
Jenny Lee
Member
Posts: 36
Registered: 7-21-2017
Location: England, UK
Member Is Offline
Mood: Meh.
|
|
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. |
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());
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.
|
|
DSD
Member
Posts: 11
Registered: 3-21-2016
Member Is Offline
|
|
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?
|
|
lottos
Administrator
Posts: 479
Registered: 6-3-2002
Member Is Offline
Mood: pass me a TimTam
|
|
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
|
|
DSD
Member
Posts: 11
Registered: 3-21-2016
Member Is Offline
|
|
Thank you!
About how long does it usually take for bugs to get fixed? Just wondering...
|
|
DSD
Member
Posts: 11
Registered: 3-21-2016
Member Is Offline
|
|
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.
|
|
lottos
Administrator
Posts: 479
Registered: 6-3-2002
Member Is Offline
Mood: pass me a TimTam
|
|
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].
|
|
Jenny Lee
Member
Posts: 36
Registered: 7-21-2017
Location: England, UK
Member Is Offline
Mood: Meh.
|
|
@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:
https://pastebin.com/t41Cqif1
Once it's ran:
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.
|
|