Problems, need help? Have a tip or advice? Post it here.
19 posts Page 1 of 2
Hello Couchies
I was wondering if there is way to bypass the required fields, when importing the CSV list with members...The original member file contains members without e-mails addresses, and none of the them has a password, because they were never online before...
So in the moment I get the multiplied Error message for every single user:
Required field cannot be left empty for E-Mail field, for password and for repeat password


Thanks in advance
Tanja
Tanja,

Usually, the standard way of handling such user accounts import is to create randomly generated password for each account and then email that password to the user (or maybe just ask them to use the 'Forgot password' feature to get a new password in their mail account).

In your case, there is no email address to send the password to.
So, I really am not sure how to proceed.

Anyway, let us forget Couch or the CSV import process for a moment - assuming you were assigned the task of creating user accounts *manually* for a set of users given only their names, could you please let me now how you would have done that from the admin panel?

Maybe you'd use a dummy email address and then assign some random passwords but then the million dollar question - how would you convey to the users their new login info without any email?

Please think over it and let me know. We can then duplicate the same solution with the CSV importer.
tanja, here is a piece that creates random email with 8 chars before '@':
Code: Select all
<cms:set random_email = "<cms:excerpt count='8' truncate_chars='1' trail=''><cms:random_name /></cms:excerpt>@yourdomain.com" />


There is a slight chance of error due to duplication of random string, so take measures to log errors
Code: Select all
<cms:if k_error><cms:log "<cms:concat k_error ' for user: ' k_page_title />" /></cms:if> 
HI KK,

if I would manually add members from the back-end, I would make dummy e-mails and dummy passwords...
I guess what @trendoman wrote below could be used for e-mail, I will have to try it with some cms:ifs, if the field is empty than fill in the dummy password...

Otherwise, the website will be offline until end of September - the client has to produce the content first. And I was not really precise vefore - there is like 2/3 of members with e-mails and 1/3 without.. Password has nobody...

A question please: how the mailing to reset a password is usually meant to be done in such situation? Through Couch? Or manually? Or some other way - like, I just think of maybe using the possibility offered by the server's backed, to make a mailing list, for members who provided mail addresses?

Thanks!

Tanja
Hi Tanja,

if I would manually add members from the back-end, I would make dummy e-mails and dummy passwords...
@trendoman has already provided you the recipe for creating dummy emails. You can use the same random email as the dummy password also (it is a random value after all) or use the <cms:random_name />again to create new values..

The question still remains as to how would you pass on this login info to the 1/3rd of the users who do not have emails.

As for your other question -
You may send the emails live as you are importing the users or, and I think this is the more prudent approach, write down the info in a CSV file and then process this CSV file separately after the import is finished to send the emails (again using the same 'staggered' approach but this time for emailing).

You may use <cms:send_mail> of Couch to do so (PHPMailer addon should be useful here) but make sure your host does not have a cap on the max number of emails sent per hour.

Alternatively, export the CSV to whatever external service you use.

In closing, writing to a CSV file could be a little daunting for you so I'll post a little solution for it soon. No worries :)
HI KK,
thanks! I will try out what I have now, I hope I succeed....
I just do not know what you exactly mean by writing a CSV file :oops, for what task, do you mean that:
In closing, writing to a CSV file could be a little daunting for you so I'll post a little solution for it soon. No worries :)


Thanks again!

Tanja
HI again, with the old question, that I would like to implement know.

I have imported the users with existing emails into their profiles (users/index.php), and I would like afterwards to send them e-mails to reset their password.
I have e-mails and random passwords generated with cms:random_name

What I understood from the previous posts in this thread , is that there should be a way to import only e-mails and to import them into a new template that would send out he mails automatically upon import?

But I am not sure where to start here, and I would appreciate help....

Thanks in advance
Tanja
Hi Tanja,

Am I to assume that at this point there are no users in Couch who don't have an email (as was the problem in the original post)?

If that is so, you can adapt the 'staggered' approach of viewtopic.php?f=5&t=8803 to use <cms:pages> (instead of <cms:csv_reader>) to iterate through all users (say, 50 users at a time) and email them using PHPMailer.

Do let me know if you have any questions.
HI KK,
Thanks!

I will have several users without e-mail, but they will have the random generated mail address in their user profile. So I thought, that way, the worst thing that can happen, is that I get the message that the mail is not delivered to those addresses?

I hope that dummy mail addresses will not interfere with the approach that you have suggested. I have to look at that first...

Tanja
HI KK,

I have thought over what's the best way to send the reset-password mails, and because the client told me they use mail chimp, the best will be to export the users in CSV and send via MChimp.

Could you please explain something to me: I am trying things out, and I imported users (all 6 users in this trial) having the same password (something like: xyser%). I am not very versed in DataBanks, anyway I looked in the DB on my server and I will be able to export CSV file with users to import in Mail Chimp, but what confuses me - there was no password that I entered (xyser%) , instead each user has randomly generated unique password. Yet, it is possible to login with the password xyser%.

Best regards
Tanja

p.s. I have just realized, that I do not see other fields from the user profile in the DB, like Address etc., its not that straightforward as I thought. So, is it possible to export somehow all the user fields from Couch? Same as there is an import.php file, is there an export.php?
19 posts Page 1 of 2

Who is online

In total there are 4 users online :: 1 registered, 0 hidden and 3 guests
(based on users active over the past 5 minutes)

Users browsing this forum: Exabot [Bot] and 3 guests