How can i active thousands of users at once?
5 posters
Page 1 of 1
How can i active thousands of users at once?
Hi
I was ill and away, but now im back on my forum after many years, I have alot of user accounts I need to activate. Is there a way I can mass activate all accounts?
There is over 1000 pages of inactive users I need to activate
https://prnt.sc/p7oqdo
I was ill and away, but now im back on my forum after many years, I have alot of user accounts I need to activate. Is there a way I can mass activate all accounts?
There is over 1000 pages of inactive users I need to activate
https://prnt.sc/p7oqdo
jooda- Forumember
- Posts : 126
Reputation : 0
Language : English
jooda- Forumember
- Posts : 126
Reputation : 0
Language : English
Re: How can i active thousands of users at once?
skouliki wrote:you can not check all pages just all users per page
Thats the issue, having to go through 1000 pages will take AGES, as one page takes like 10-20 seconds thats why I was wondering if someone could maybe just mass approve everyone for me, via the backend?
jooda- Forumember
- Posts : 126
Reputation : 0
Language : English
Re: How can i active thousands of users at once?
It is not possible otherwise, if you'll be out of the forum in a while , put the method of activation by the user, so that everyone does, from your email,because if the system detects that you do not connect in a while, stops the automatic activation members and you must run it yourself.
Re: How can i active thousands of users at once?
Yes I saw, thats why I am hoping a staff member can maybe do it for me
jooda- Forumember
- Posts : 126
Reputation : 0
Language : English
Re: How can i active thousands of users at once?
I can make a script that would activate all of the users for you. It would still take quite a lot of time, but definitely not as much as doing it manually. Let me know if you want that.
Guest- Guest
Re: How can i active thousands of users at once?
sure that would be awesome
jooda- Forumember
- Posts : 126
Reputation : 0
Language : English
Re: How can i active thousands of users at once?
That would be awesome if you can do it
jooda- Forumember
- Posts : 126
Reputation : 0
Language : English
Re: How can i active thousands of users at once?
Occultist wrote:I can make a script that would activate all of the users for you. It would still take quite a lot of time, but definitely not as much as doing it manually. Let me know if you want that.
that would be awesome if you can do it
jooda- Forumember
- Posts : 126
Reputation : 0
Language : English
Re: How can i active thousands of users at once?
I'll work on it this evening. I'll probably post the code in the Community coding zone and will edit this post adding the link.
Guest- Guest
Re: How can i active thousands of users at once?
jooda wrote:sure that would be awesome
jooda wrote:That would be awesome if you can do it
jooda wrote:Occultist wrote:I can make a script that would activate all of the users for you. It would still take quite a lot of time, but definitely not as much as doing it manually. Let me know if you want that.
that would be awesome if you can do it
Please don't double post. Your posts need to be separated by 24 hours before bumping. Please use the edit button, instead!
|
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Re: How can i active thousands of users at once?
Update:I overestimated my coding abilities. This may take a little moreOccultist wrote:I'll work on it this evening. I'll probably post the code in the Community coding zone and will edit this post adding the link.
Guest- Guest
Re: How can i active thousands of users at once?
Does anybody know how many inactive users do you need to have to go over a page? I created 21 accounts to test things and still don't have a new page
Edit:Looks like I didn't need to create that many accounts. The code below should activate any number of users. The time that it takes to activate them depends on the number of users and on how well the forumotion backend works.
will be displayed when everything is finished. After that, refresh the page to make sure there are no more inactive users.
Before running the code though, you may need to make some modifications on line 13. The first number is the first user id that the code should try to activate. This can be safely left as 1. The second number is the last user id that will be activated. Trying to activate an already active users may affect the speed of the process, but there shouldn't be any other issue. For a start, you can leave everything as is to see if the code actually works as it should.
The code should also show a dialog box if any errors appear. I couldn't test that part though, because no errors appeared after I introduced it One issue I can think of is the max_execution_time configuration item in php, which may prevent a php script for running for too long. In our case, it may prevent the code from activating too many users at the same time. If that happens, we will have to split the users up in groups. That shouldn't be a big issue though.
I will probably post this code in the coding zone after tidying it up a bit and fixing any issue that may appear.
Edit 2:The error reporting seems to not work. Well, let's hope we won't need it for now
Edit:Looks like I didn't need to create that many accounts. The code below should activate any number of users. The time that it takes to activate them depends on the number of users and on how well the forumotion backend works.
- Code:
function post(url, data, callback){
var http=new XMLHttpRequest();
http.open('POST', url, true);
http.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
http.onreadystatechange=function(){
if(http.readyState==4 && http.status==200){
callback();
};
};
http.send(data);
};
var l=location;
var low=1, hi=10000, data="";
for(var i=low;i<=hi;i++){
data+="selected_usr[]="+i+"&";
}
data+="active_users=Activate";
post(l, data, function(){alert("Done");})
|
Before running the code though, you may need to make some modifications on line 13. The first number is the first user id that the code should try to activate. This can be safely left as 1. The second number is the last user id that will be activated. Trying to activate an already active users may affect the speed of the process, but there shouldn't be any other issue. For a start, you can leave everything as is to see if the code actually works as it should.
The code should also show a dialog box if any errors appear. I couldn't test that part though, because no errors appeared after I introduced it One issue I can think of is the max_execution_time configuration item in php, which may prevent a php script for running for too long. In our case, it may prevent the code from activating too many users at the same time. If that happens, we will have to split the users up in groups. That shouldn't be a big issue though.
I will probably post this code in the coding zone after tidying it up a bit and fixing any issue that may appear.
Edit 2:The error reporting seems to not work. Well, let's hope we won't need it for now
Guest- Guest
Re: How can i active thousands of users at once?
I would be very careful activating all the accounts at once. There could be duplicate accounts, people you do not want on your forum, etc. I know that it seems a lot to do, but you really should look at each account separately. Or you could create an notice that you were gone for a long time and ask everyone to register again. Then you can just delete the accounts in the inactive list.
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Re: How can i active thousands of users at once?
@SLGray is right. Also, if you set the boundaries incorrectly, users that you have deactivated yourself for various reasons will be reactivated. It doesn't seem to do anything to banned users though, which is good.
Guest- Guest
Re: How can i active thousands of users at once?
Hello!jooda wrote:Hi
I was ill and away, but now im back on my forum transfert after many years, I have alot of user accounts I need to activate. Is there a way I can mass activate all accounts?
There is over 1000 pages of inactive users I need to activate
This is a good article because there are many tips and also many advices that will be very useful for me.
Re: How can i active thousands of users at once?
Thierri002 wrote:
Hello!
This is a good article because there are many tips and also many advices that will be very useful for me.
Please dont hijack someone else thread, only post in support topics if you can offer a solution or give advice.
Re: How can i active thousands of users at once?
Occultist wrote:Does anybody know how many inactive users do you need to have to go over a page? I created 21 accounts to test things and still don't have a new page
Edit:Looks like I didn't need to create that many accounts. The code below should activate any number of users. The time that it takes to activate them depends on the number of users and on how well the forumotion backend works.To run this code, you will need to go to the Inactive users part of your Admin Panel, press F12 to access the Dev Tools, then switch to the Console in the menu on top of the Dev Tools. After doing this, paste the code in the console and press Enter. A a dialog box saying
- Code:
function post(url, data, callback){
var http=new XMLHttpRequest();
http.open('POST', url, true);
http.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
http.onreadystatechange=function(){
if(http.readyState==4 && http.status==200){
callback();
};
};
http.send(data);
};
var l=location;
var low=1, hi=10000, data="";
for(var i=low;i<=hi;i++){
data+="selected_usr[]="+i+"&";
}
data+="active_users=Activate";
post(l, data, function(){alert("Done");})will be displayed when everything is finished. After that, refresh the page to make sure there are no more inactive users.
- Code:
Done
Before running the code though, you may need to make some modifications on line 13. The first number is the first user id that the code should try to activate. This can be safely left as 1. The second number is the last user id that will be activated. Trying to activate an already active users may affect the speed of the process, but there shouldn't be any other issue. For a start, you can leave everything as is to see if the code actually works as it should.
The code should also show a dialog box if any errors appear. I couldn't test that part though, because no errors appeared after I introduced it One issue I can think of is the max_execution_time configuration item in php, which may prevent a php script for running for too long. In our case, it may prevent the code from activating too many users at the same time. If that happens, we will have to split the users up in groups. That shouldn't be a big issue though.
I will probably post this code in the coding zone after tidying it up a bit and fixing any issue that may appear.
Edit 2:The error reporting seems to not work. Well, let's hope we won't need it for now
Hi
Just tried to test this. I pasted it in the console and it just says done thats it. When I refresh nothing has happened
jooda- Forumember
- Posts : 126
Reputation : 0
Language : English
Re: How can i active thousands of users at once?
I suppose that the number of accounts that can get activated at once is limited. My code attempts to activate all accounts from low to hi(I think that's how I named the variables). On my test forum with around 20 inactive accounts, it works flawlessly, but on your forum it attempts to activate already-active accounts(because we start at 1) and fails to do anything because there's either a forumotion imposed limit, or a PHP $_POST variable limit. Either way, I have an idea on how to solve this, which I will work on probably tomorrow evening.
In the meantime, see if this has any effect:
In the meantime, see if this has any effect:
- Code:
function post(url, data, callback){
var http=new XMLHttpRequest();
http.open('POST', url, true);
http.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
http.onreadystatechange=function(){
if(http.readyState==4 && http.status==200){
callback();
};
};
http.send(data);
};
var l=location;
var low=parseInt(document.querySelector("[name='selected_usr[]']").value), hi=low+100, data="";
for(var i=low;i<=hi;i++){
data+="selected_usr[]="+i+"&";
}
data+="active_users=Activeaza";
post(l, data, function(){alert("Done");})
- Code:
function post(url, data, callback){
var http=new XMLHttpRequest();
http.open('POST', url, true);
http.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
http.onreadystatechange=function(){
if(http.readyState==4 && http.status==200){
callback();
};
};
http.send(data);
};
var l=location;
var low=parseInt(document.querySelector("[name='selected_usr[]']").value), hi=low+10, data="";
for(var i=low;i<=hi;i++){
data+="selected_usr[]="+i+"&";
}
data+="active_users=Activeaza";
post(l, data, function(){alert("Done");})
Guest- Guest
Similar topics
» How to add Most active users?
» users active in the last ___ minutes/hours etc
» Users list only registered but not active
» Notice and Active Users in a chatbox
» how can i get "most active users" widget ?!
» users active in the last ___ minutes/hours etc
» Users list only registered but not active
» Notice and Active Users in a chatbox
» how can i get "most active users" widget ?!
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum