Import multiply users from CSV

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
titovetch
Posts: 44
Joined: 20 Jun 2017, 14:26

Import multiply users from CSV

Post 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
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Import multiply users from CSV

Post 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.
Please use Search before posting and read the Manual
titovetch
Posts: 44
Joined: 20 Jun 2017, 14:26

Re: Import multiply users from CSV

Post 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
titovetch
Posts: 44
Joined: 20 Jun 2017, 14:26

Re: Import multiply users from CSV

Post by titovetch »

@atrol
can a create 200 users using sql script
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Import multiply users from CSV

Post 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.
Please use Search before posting and read the Manual
titovetch
Posts: 44
Joined: 20 Jun 2017, 14:26

Re: Import multiply users from CSV

Post 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
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Import multiply users from CSV

Post 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);
Please use Search before posting and read the Manual
titovetch
Posts: 44
Joined: 20 Jun 2017, 14:26

Re: Import multiply users from CSV

Post 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'
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Import multiply users from CSV

Post by atrol »

You have to insert unique values for cookie_string.
Please use Search before posting and read the Manual
sandyj
Posts: 4
Joined: 15 Nov 2017, 01:16

Re: Import multiply users from CSV

Post by sandyj »

Importing users via CSV is a MantisHub exclusive plugin.
Post Reply