manlio Posted November 10, 2021 Share Posted November 10, 2021 Hi to everybody. I need to import a lot of users with custom fields, all with the same password (it is for an event). I have used in the past ImportPagesCSV module (with some "hack" to move the imported pages to the users PW admin location) and I would like to know what is the best approach for this task today. Admin Action module can do this? Another doubt is how I have to write multiple roles (for the same user) into the csv file to be imported correctly? Thank you! Link to comment Share on other sites More sharing options...
manlio Posted November 12, 2021 Author Share Posted November 12, 2021 Probably ImportPagesCSV module is still my best choice, but is there any way to import multiple roles for the same user? Thank you. Link to comment Share on other sites More sharing options...
BillH Posted November 12, 2021 Share Posted November 12, 2021 I think that the "Import Batch Users" action of the AdminActions module will do what you want. You can assign multiple roles to the users and add values to multiple fields. You paste in CSV or JSON. Link to comment Share on other sites More sharing options...
manlio Posted November 12, 2021 Author Share Posted November 12, 2021 Thank you BillH, I was trying it in this moment and it seems to work. The only drawback for me is that I need to provide unique name in the CSV file and it doesn't change automatically for me. Apart from this it works quite well. I am still trying to make ImportCsv module work to see if it is quicker for my use case. Thank you again! 1 Link to comment Share on other sites More sharing options...
BillH Posted November 12, 2021 Share Posted November 12, 2021 Just a thought, but it would probably be quite easy to make a copy of the Import Batch Users action and amend it to handle duplicate names in whatever way you want. It might be as straightforward as replacing the code that issues the failure message with code to loop through the array of new users and deal with duplicates. 1 Link to comment Share on other sites More sharing options...
manlio Posted November 12, 2021 Author Share Posted November 12, 2021 This is a good suggestion, I never used Admin Actions and I didn't know that actions can be easily added and modified. In the meantime I'm having success with the ImportCSV module, I just need to move the pages in the right place and than I'm fine. For multiple roles I used the pipe "|" and it works like a charm. It's a pity that this module hasn't this feature by default. I think PW needs an easier (and maybe native) import for external users ?. If I cannot complete I will try also your suggested route, I really appreciate your help Bill. Thank you! Link to comment Share on other sites More sharing options...
BillH Posted November 12, 2021 Share Posted November 12, 2021 Creating new (or amended) actions is quite straightforward, and there are good instructions on the module page. Good luck with getting it working! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now