We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Import new users from spreadsheet - How-to | Forum

Wells Anderson
Wells Anderson Sep 17 '18
Here is a detailed, rough list of steps for importing new users from a spreadsheet file. 

;tldr You can import new members but it takes a lot of time!


I spent hours figuring this out and executing it after the CSV import plugin failed to recognize .CSV and .CSV.ZIP files.


While it is easy for people to sign up for their own accounts, in our situation we wanted to create accounts for members who won't access the site. We want to post photos, comments and memories about these members. So we needed to create accounts for them. Also, we are emailing some users letting them know they have an account and are welcome to login with their new username and password.

Oxwall Import Members

==============================

cPanel / File Manager

View the file located in websitedirectory/ow_includes/config.php, the  main 

configuration file the application uses. 

Next to: OW_DB_NAME is your database name

cPanel / phpMyAdmin / [YOUR_DOMAIN]_oxwa555 (Your main domain without .com plus the 

database name)

classcom_oxwa427


Click on ow_base_user

Export several records (with different Account Types) to CSV

Study the fields

Create a spreadsheet

  Include First and Last (for use later with ow_base_questions_data)

  Generate one-word usernames

  Use existing emails or generate emails to go to a CatchAll username@wellsa.com

(username@SOME_DOMAIN.com)

  Generate passwords

    Instructions:

    https://www.webhostface.com/...set-oxwall-password/

    Concatenate Salt for your site with plain text password

    Example:  5a1gc8148d3c93some_plain_text

      The first part is your Salt (see instructions at webhostface, above)

      some_plain_text is a different password for each user.

      Later you can email usernames and passwords to your users.

      Generate SHA256 hash of each password (or create an Excel function - hard!)

      https://www.xorbin.com/tools/sha256-hash-calculator

Create joinStamp column values. You can recycle an existing member's.

  It is a UNIX 10-digit date value.

Paste accountType values into that column. We have Free and Deceased

Save as an XLSX

Delete the top row and save as CSV

Zip the file. Rename the Zip file to end in .csv.zip

In the ow_base_user table, click Import

  Select CSV

  Make sure that Columns separated with is a comma if your CSV uses commas between 

fields.

  Delete the Column enclosed with value, unless your CSV file has quotes around all 

values.

Press Go

If the import fails, it gives an informative error message.

  A problem with number of Columns may relate to your separator or enclosed with "

  A problem with duplicate id values is fixed by making sure that

    your lowest id in your import file is higher than the highest id

    value in the table.


Now import into ow_base_questions_data

  This import will add Firstname Lastname in the Name field of your members.

You will need the id of each user from the ow_base_user spreadsheet

Generate id values starting with one plus the highest id in the 

ow_base_questions_data table. Don't duplicate an existing value.

Example:

id,questionName,userId,textValue,intValue,dateValue

87,realname,37,John Collins,0,NULL

As before, save the spreadsheet as a .CSV file, zip it and rename with .csv.zip

Import as above.


Import Roles for Users

  Users will not have access to anything without a role!

Lookup the id's of your site's Roles in ow_base_authorization_role

  Two included Roles are guest, wqewq (free). We added another.

Import records into:

ow_base_authorization_user_role

id,userId,roleId

The id is sequential starting with one more than the highest existing id in the 

table. 

userId is from ow_base_user. 

roleId from is from  ow_base_authorization_role

As before, save the spreadsheet as a .CSV file, zip it and rename with .csv.zip

Import as above.



The Forum post is edited by Wells Anderson Sep 17 '18
Oxwall Germany Club
Oxwall Germany Sep 17 '18
Topic was moved from General Questions.
AppXprt
AppXprt Sep 23 '18
Very Nice Info!


I've been thinking about creating a a good CSV parser


With your CSV files did you try uploading using .CSV and .csv


Shouldn't matter if the Dev used strtolower on the extension, but I don't have this plugin installed and haven't ever tried importing from CSV...

Wells Anderson
Wells Anderson Oct 10 '18

Thank you for the kind words.

I only used lower case .csv filenames. I am guessing that .CSV would work, too.
ali
ali Apr 11 '23
В Арт Академи в София, децата могат да се научат на различни техники за рисуване, керамика, крафт с полимерна глина и много други изкуствени дейности. През последните години, училището се е утвърдило като един от най-добрите центрове за изкуство за деца в София. Една от големите предимства на Арт Академи е, че децата не само могат да се забавляват, но и да учат много полезни умения като търпение, точност и творческо мислене. Децата могат да се развиват в своите умения и да изразят своята индивидуалност. В Арт Академи има и опитни учители, които ще насочат децата и ще им помогнат да развият своя талант. Всички материали и оборудване, необходими за изкуството, са на разположение в училището. Арт Академи
Ravina Sharma
Ravina Sharma May 18 '23

[url=http://www.ramika.co.in/nasirabad-escort]  Nasirabad Escorts [/url] ||

[url=http://www.ramika.co.in/pali-escort]  Pali Escorts [/url] ||

[url=http://www.ramika.co.in/pratapgarh-escort]  Pratapgarh Escorts [/url] ||

[url=http://www.ramika.co.in/pushkar-escort]  Pushkar Escorts [/url] ||

[url=http://www.jodhpurescortservice.com/nagaur-escort]  Nagaur Escorts [/url] ||

[url=http://www.jodhpurescortservice.com/nasirabad-escort]  Nasirabad Escorts [/url] ||

[url=http://www.jodhpurescortservice.com/pali-escort]  Pali Escorts [/url] ||