Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Import users from an access database or any csv file.  (Read 18554 times)

0 Members and 1 Guest are viewing this topic.

Nibbler

  • Guest
Import users from an access database or any csv file.
« on: April 07, 2005, 06:00:41 pm »

As specified here this script will import users into the coppermine database from a csv (comma seperated values) file that can be created by most spreadsheet applications. For this the csv file was of the form

Code: [Select]
"Password","UserName","FullName","E-Mail"
with one user per line. (The FullName field was unused)

To use the script, remove the .txt ending, upload into your coppermine directory, login as admin, and browse to the file. It will then prompt you to upload the csv file and display the results. To add users at a later date you can upload a new csv file with the users you wish to add. Any duplicates will be discarded. Usernames must be unique. There is no validation of the details imported.

Designed for unbridged standalone 1.3 but can work with 1.2 or 1.4 with slight modification.

Thanks go to coffejor for funding this mod.
« Last Edit: April 08, 2005, 08:49:02 am by GauGau »
Logged

Gary B

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 38
    • Hagerty High School
Re: Import users from an access database or any csv file.
« Reply #1 on: January 26, 2006, 10:16:47 pm »

What type of modification is needed to work with the current version?
Logged

Nibbler

  • Guest
Re: Import users from an access database or any csv file.
« Reply #2 on: January 26, 2006, 10:18:30 pm »

For 1.4, find

Code: [Select]
db_query
change to

Code: [Select]
cpg_db_query
Logged

Gary B

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 38
    • Hagerty High School
Re: Import users from an access database or any csv file.
« Reply #3 on: January 26, 2006, 10:19:52 pm »

Man that was fast! Thanks!
Logged

alexr

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: Import users from an access database or any csv file.
« Reply #4 on: September 12, 2007, 06:39:28 am »

Could you tell me some more info regarding running this script

1) You mention: Upload into your coppermine directory - are you referring to a specific folder at all?

2) After logging in as admin how do you browse to the file?

Thanks,
Alex

Running version 1.4.12
Logged

jvt

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: Import users from an access database or any csv file.
« Reply #5 on: August 20, 2009, 06:11:31 pm »

I came to need this feature, but it didn't seem to work. I had to slightly modify the file:

replace the line:

'password' => $parts[0],

by:

'password' => ($CONFIG['enable_encrypted_passwords'])?md5($parts[0]):$parts[0],

Thanks to the original poster, however, it is easier to modify than to code from scratch...
Logged
Pages: [1]   Go Up
 

Page created in 0.022 seconds with 19 queries.