I added Role expire support support for User Import.
Just extract the file into /user_import/supported

Comments

aitala’s picture

Just checking, but there is only one file in the tar ball? No ._ file?

Thanks,

Eric

kpojeta’s picture

I used the patch but continue getting this error:
Role expiry time is not in correct format.

I am able to see "role expiration time" during the user import field matching process, and the users import, but I haven't successfully had the expiration import.

Advice??

michellezeedru’s picture

Thank you for contributing this! I added the file in /user_import/supported, but I don't see where this comes into play? I expected on the import settings page an option to set one of my fields as the role expiration date, but there is none. Is there a step I'm missing or am I looking in the wrong place? Thanks for the help!

aitala’s picture

I am having the same issue and I have tried using different date formats on the import. The odd thing is that it appears to work for some users but not others. I am also not sure that the import replaces the expire date is one already exists.

As far as I can tell the correct format is DD-MM-YYYY

Of course it also appears that the Role Expire module has the wrong format in the Help Text for the field since it says yyyy-mm-dd which 'works' but transforms to DD-MM-YYYY?!?

Eric

aitala’s picture

Any chance of a Drupal 7 version? Or would this code work as is?

Thanks,

Eric

elstudio’s picture

Issue summary: View changes
StatusFileSize
new2.22 KB

This does seem to work for D7. I've attached a patch file version of the original tar ball.

There are couple of methods in there may not need to be implemented, but the patch is working for me so far.

aitala’s picture

I get two errors on import

Notice: Undefined variable: form in role_expire_user_import_form_fieldset() (line 21 of sites/all/modules/contrib/user_import/supported/role_expire.inc).
Notice: Undefined variable: form in role_expire_user_import_form_update_user() (line 45 of sites/all/modules/contrib/user_import/supported/role_expire.inc).

But it does seem to work.

Thanks a bundle,
Eric

gisle’s picture

Status: Needs review » Closed (outdated)

According to #7, this is not ready for production.

Also support for fields from contributed projects should be done by implementing hook_field_user_import_supported_alter() in the project that implements the field, not by adding bloat to this project.

Since this is for Drupal 6, I am closing as outdated.