About

This component/theme does NOT work with the latest OSSN version.

{ "com_id": "CSVUser", "latest_version": "6.1","ossn_version_prefix": "6.0", "works_on_latest_version": "no" }

I. Release Notes

Current Version: 6.1
Requirements: Ossn >= 6.0
GDPR affected: No
License: GNU General Public License v2

 

II. Purpose and Usage

This component allows you to import a list of new members to your Ossn community from a so-called 'csv' file in just one step.
As an option you may make them a member of one group of your choice.

Figure 1

Before using this tool, a few pre-requisites must be definitely met:

  • you have made a backup of your Ossn database AND you know how to restore it
  • you have a basic knowledge of csv files and how to create one ( https://www.computerhope.com/issues/ch001356.htm )
  • your CSV file is a plain UTF-8 encoded text file without binary header (w/o BOM)

As for the last topic, a ready-to-use CSV file named example.csv is included. Just open that file from a local directory with a simple text editor like notepad and have a look at the first line now:

username,email,first_name,last_name,gender,birthdate

This line is called a 'header', it is mandantory, and it defines the order of all following user records. Do not change it, and don't remove it.
All 6 fields have to be compliant with Ossn's internal data structures, thus it makes sense to have a closer look at each of them.

  • username: has to be at least 5 characters long, no spaces, no special characters, just a-z, A-Z, and numbers are allowed
  • email: a valid email address, since it may be used to send activation keys to your new users
  • first_name: has to be at least 2 characters long, spaces and special characters and numbers are allowed
  • last_name: same as first_name
  • gender: must be 'f' for female users, or 'm' for males. Any other invalid or empty entries will be replaced by 'male'
  • birthdate: the only accepted notation is dd/mm/yyyy. Any other format or leaving this field blank will result in a replacement of the user's birthdate by the current date

All following lines must be user records - one user per line

Adam03,adam@z-mans.net,Adam D.,Schießbörger,m,19/03/1993

... this is a perfectly complete record, gender and birthdate are explicitely set and correctly formatted, some special chars are used with the first and the last name ...

tomato,tomato@z-mans.net,rita,red,,

... the most incomplete record, and although a woman most obviously, Rita will be set to 'male' since no gender has been set ...

Note, that the commas must be left in place, though. Otherwise the
number of fields wouldn't match with the 6 columns of the header.

sjacobs,tomato@z-mans.net,Susan,Jacobs,f,

... Susan will be set to 'female' correctly, but again her birthdate will be set to the day of insertion because the last column has been left empty ...

So if you don't want to stress your members too much with correcting their profiles later on, it's a good idea to make sure all records are as complete as possible.

And once again: The first 4 columns can't be empty - if so, CSV User Import will throw out an error and exit.

Fortunately, this component comes with a lot of built-in error checking already, as Ossn won't work with duplicate usernames or email addresses for example.

Okay, let's go ahead. After installing and enabling this component, please navigate to Configure->CSV User Import.

First, you have to decide whether you want to send a validation email to every newly imported user. This option is disabled by default, because it may really stress your server in case of larger csv files. And especially on shared hosts it can't be wrong to ask your provider first, whether these kind of mass mailings are allowed at all.

If you leave this option unchecked, no mail will be sent and all users will be activated automatically. Still playing around with the example.csv, this should be the preferred option anyway. Next, click the [Browse...] button to select the example.csv file. Finally click the [Import] button.

Good luck!

One last important thing to note:

Since your member's old passwords are long encrypted strings nobody would love to remember, and dealing with clear text passwords is no good idea either, the members's new password has been saved as a copy of his email address.
Referring to Adam03 from above that means: He will be able to log in with the password: adam@z-mans.net

Please instruct your new members to change their password once after logging in for the first time.

 

III. Changes

V 6.1

  • Ossn 6.x support
  • verified PHP 8 compatibility
  • added instructions to admin backend

Outdated Ossn 5.x releases

V 2.2

V 2.1