Documentation

csv_functions.php

Table of Contents

Functions

csv_user_import_process()  : bool
Import users from uploaded CSV file or validate file for future use

Functions

csv_user_import_process()

Import users from uploaded CSV file or validate file for future use

csv_user_import_process(string $csv_file, string $user_group_id, array<string|int, mixed> &$messages[, bool $processcsv = false ]) : bool

mandatory_columns in csv: 'username', 'email' optional_columns in csv: 'password', 'fullname', 'account_expires', 'comments', 'ip_restrict', 'lang'

Parameters
$csv_file : string

Filepath to input file

$user_group_id : string

Usergroup reference to add new users to

$messages : array<string|int, mixed>

Array to store errors or warnings

$processcsv : bool = false

if true process file else validate file only

Return values
bool

Return true if file processed of validated successfully, false if unable to process or validate file

On this page

Search results