phpScheduleIt
May 23, 2013, 05:17:15 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: phpScheduleIt 2.4.2 has been released!
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: Importing Users.  (Read 2748 times)
argon0
Newbie
*

Karma: 0
Posts: 7


« on: July 13, 2006, 06:01:54 AM »

Rather than use an LDAP database (to do so I would need to connect to several DBs, including Win2k3, WinNT and one other LDAP DB, and I'm not sure that I'd be ABLE to connect to the WINNT one!), I'd like to import a list of users INTO phpScheduleIt.

Is this possible (I'm pretty sure it is), and if so HOW does one go about doing it?

My complete user list is in CSV format, currently, and I can export a new list on a schedule, all users would initially NOT need Admin privileges.

Anybody got any ideas - I HAVE searched the Fora, but can't find anything....

Argon0
Logged
Nick
Administrator
Hero Member
*****

Karma: 15
Posts: 5419


WWW
« Reply #1 on: July 13, 2006, 09:40:45 AM »

You would have to import these users directly into your database.  If you know a bit about PHP, this can be done without much work.  You just need to create a script in the root of your phpScheduleIt folder that includes lib/Auth.class.php.  Then cycle through your list of users sort of like this:

$auth = new Auth();
foreach user {
$fields = split_data_fields_into_array();
$auth->do_register_user($fields, true);
}

The fields needed can be found in lib/db/AuthDB.class.php insertMember().  You may also want to comment out the lines of Auth that send emails.
Logged
argon0
Newbie
*

Karma: 0
Posts: 7


« Reply #2 on: July 14, 2006, 05:03:38 PM »

Hmmm...

OK I will try this next week, I may need some help.

Argon0
Logged
argon0
Newbie
*

Karma: 0
Posts: 7


« Reply #3 on: July 27, 2006, 12:10:00 PM »

Actually this is quite easy to do...

Get hold of a tool called SQLyog (google it) and use it to import a csv file into a table - you do need to be careful that the csv file is set up the same way as the table (i.e. columns in the same order, and not too much info in the columns) then you can import/export from the MySQL dbs quite easily.

The table you are interested in in this case is login. Looking at the structure its quite easy to work out what to do with it...

Thanks for the great system - blew all the Exchange based systems I could lay my hands on right out of the water!!!

Argon0
Logged
Nick
Administrator
Hero Member
*****

Karma: 15
Posts: 5419


WWW
« Reply #4 on: July 27, 2006, 01:06:37 PM »

Nice tip, thanks.  Glad to hear it worked.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2006-2007, Simple Machines Valid XHTML 1.0! Valid CSS!