create multiple account from the admin center

Started by glennmckenna, September 04, 2015, 09:47:24 AM

Previous topic - Next topic

glennmckenna

hello,
today i'm to find out if the is a way to create multiple accounts using the system from the admin center to create accounts
basilcy it will be made from an excel table were all the names and email addresses will be stocked

any help would be much aprecianted

Kindred

no. there is no way to do that from within the admin screens.

You would have to write a script to trigger createUser (ummm... I think that's the name of the function)

adding them directly in the database is a bad idea -- before anyone suggests it - because creating a user has several additional tables that it touches to do the records correctly
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

margarett

As Kindred said, not from the admin center

But some custom code should help and it was done before ;)
http://www.simplemachines.org/community/index.php?topic=522213.0
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

JBlaze

<?php
ini_set
('memory_limit''2000M');
require_once(
'SSI.php');
$i 1;
while (
true) {
    
$userOptions = array(
        
'username' => 'Member ' $i,
        
'email' => 'test.' $i '@localhost.pvt',
        
'passwd' => 'password123',
    );
    
createUser($userOptions);
    
$i++;
}


;)


NOTE: Do not use this code. It will have... bad effects :P
Jason Clemons
Former Team Member 2009 - 2012

margarett

Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

glennmckenna

Quote from: JBlaze on September 04, 2015, 10:35:27 AM
<?php
ini_set
('memory_limit''2000M');
require_once(
'SSI.php');
$i 1;
while (
true) {
    
$userOptions = array(
        
'username' => 'Member ' $i,
        
'email' => 'test.' $i '@localhost.pvt',
        
'passwd' => 'password123',
    );
    
createUser($userOptions);
    
$i++;
}


;)


NOTE: Do not use this code. It will have... bad effects :P
right thanks for the answers
before i start dare ask what would happen if i ran that code ???


may i say that what @kindred said was exactly thought, and i was hoping that it would of been just as easy as inserting directly into the Data Base
any way after doing some digging through the link that margrett gave me i got to the topic
http://www.simplemachines.org/community/index.php?topic=460848.0
so if i understood correctly in one colum i've got the email addresses and in the other the passwords ?
and then i just upload the php script to the website diricet my way to it in the browser then "run" it ?

margarett

It would probably crash MySQL due to enormous amounts of queries :P Or until you run out of disk space because the database would grow like hell.
In short: it would create users until it can't no more :P

About the other code, yes, you need to put the data in the right order. Then load both the csv and php files into your forum root and run them via browser
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Advertisement: