Page 1 of 1

Import multiply users from CSV

Posted: 03 Jul 2017, 08:43
by titovetch
Hi,
i see that its possible to import multiply users in MantisHUb with a new plugins called "Import Users from CSV ", how can i use the same plugin or its exclusive for MantisHUb .

another questions can i create user manual and set a default password for the user and to be changed once logged

Re: Import multiply users from CSV

Posted: 04 Jul 2017, 11:01
by atrol
I don't see the plugin at https://github.com/mantisbt-plugins/ or https://github.com/mantishub
So it seems to be exclusive. You could contact MantisHub and ask if they publish the plugin.
titovetch wrote:can i create user manual and set a default password for the user and to be changed once logged
Not possible out of the box.

Re: Import multiply users from CSV

Posted: 05 Jul 2017, 06:54
by titovetch
i just found the below link and its a good feature to be added :)


https://support.mantishub.com/hc/en-us/ ... s-from-CSV

Re: Import multiply users from CSV

Posted: 04 Sep 2017, 10:42
by titovetch
@atrol
can a create 200 users using sql script

Re: Import multiply users from CSV

Posted: 04 Sep 2017, 13:34
by atrol
I am not sure if I understand what you are asking for.

You can use SQL to create users by inserting rows to database table mantis_user_table.
Have a look at function user_create in file core/user_api.php to get an impression how to populate database fields.

Re: Import multiply users from CSV

Posted: 06 Sep 2017, 13:38
by titovetch
i have more than 200 users need to be created so i'm asking if there is any solution to do that, sorry but im not a developer and i tried to INSERT INTO databse useing sql and the user was created as i need but unfortunately i can't login because the password seated as text.

i need your support to know how can i do it using sql

Re: Import multiply users from CSV

Posted: 06 Sep 2017, 13:58
by atrol
titovetch wrote: i can't login because the password seated as text.l

Code: Select all

UPDATE mantis_user_table SET `password` = MD5(password);

Re: Import multiply users from CSV

Posted: 08 Sep 2017, 07:35
by titovetch
i have used the below query but its gave me this error because the last cookie_string was empty

Code: Select all

INSERT INTO `mantis_user_table`(`username`, `realname`, `email`,  `enabled`, `protected`, `access_level`,`password`) 
VALUES ("username","fullname","fullname@gmail.com",1,0,25,MD5("passw0rd"))

Code: Select all

#1062 - Duplicate entry '' for key 'idx_user_cookie_string'

Re: Import multiply users from CSV

Posted: 12 Sep 2017, 21:12
by atrol
You have to insert unique values for cookie_string.

Re: Import multiply users from CSV

Posted: 15 Nov 2017, 21:16
by sandyj
Importing users via CSV is a MantisHub exclusive plugin.