Hi,

I'm using Drupal to programatically create a user, and I get this exception each time I create a user. Any thoughts on how to avoid this?

Thanks

CommentFileSizeAuthor
#1 persistent_login-1273700-1.patch781 bytesgapple

Comments

gapple’s picture

Status: Active » Needs review
StatusFileSize
new781 bytes

Thank you for the bug report.

This should be a quick fix to test that a uid exists before trying to clear tokens. Please test that the attached patch resolves the issue.

nagiek’s picture

Will test and let you know.

In the meantime, I switched from user_save to drupal_form_submit('user_register_form', $form_state), which doesn't have the exception.

Thanks for the quick response!

nagiek’s picture

Works perfect. Thanks.

nagiek’s picture

Status: Needs review » Fixed
gapple’s picture

Status: Fixed » Reviewed & tested by the community

Marking RTBC so I remember to add this to the 7.x branch and push.

gapple’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.