Hello community
I want know the way to create lots users on csweb server.
I need to create 30 users and want insert at mysql database the users, but i dont know what is the function i need to use csweb to encrypt password field.
thanks
how registry lots users CSWEB
how registry lots users CSWEB
Hugo Diaz Nuñez
Dominican Republic
Dominican Republic
Re: how registry lots users CSWEB
We are planning to add a a way to upload a spreadsheet of users to CSWeb but it is not ready yet. In the meantime if you look in the setup script (csweb\setup\configure.php) you can see how the admin user is created. It uses the standard php password_hash function:
$hash = password_hash($adminPassword, PASSWORD_DEFAULT);
$sql = <<<EOT
INSERT IGNORE INTO `cspro_users` (`username`, `password`, `first_name`, `last_name`,`role`) VALUES
('admin', '$hash', 'System', 'Administrator','2');
EOT;
$pdo->exec($sql);
To create a non-admin users change the '2' to '1'.
Note that in future versions of CSWeb this may not work as we are planning to add more fine-grained user permissions which will change the user table in the database. However this will work for the current version.
$hash = password_hash($adminPassword, PASSWORD_DEFAULT);
$sql = <<<EOT
INSERT IGNORE INTO `cspro_users` (`username`, `password`, `first_name`, `last_name`,`role`) VALUES
('admin', '$hash', 'System', 'Administrator','2');
EOT;
$pdo->exec($sql);
To create a non-admin users change the '2' to '1'.
Note that in future versions of CSWeb this may not work as we are planning to add more fine-grained user permissions which will change the user table in the database. However this will work for the current version.
Re: how registry lots users CSWEB
Hi Josh,
Does that mean, by this way you'll consider implementing theses permissions too in DataViewer so a specific user can read-only/View only data ( No export, tabulate frequencies or convert)?
Also the Csdb file can be opened only in DataViewer using the same permissions/rights?
Thanks in advance for supporting me!
Does that mean, by this way you'll consider implementing theses permissions too in DataViewer so a specific user can read-only/View only data ( No export, tabulate frequencies or convert)?
Also the Csdb file can be opened only in DataViewer using the same permissions/rights?
Thanks in advance for supporting me!
G.VOLNY, a CSProuser from Haiti, since 2004
Re: how registry lots users CSWEB
@htuser. No, that is not in our near term plan.