-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run the standalone form feed with the current user #138
Comments
Sorry, that's my fault, the explaining was not very accurate. This has to be with the new FeedsAccountSwitcher class, that as far as I understand, it changes the current user to "root" (uid = 1), while the whole import process is running in the background. I see this in function switchTo($account), in the FeedsAccountSwitcher class. I need to avoid this, because I have to store the current user uid in the database while the importing is running. Currently I'm patching the Feeds module, commenting the line $this->switchAccount() in FeedsSource.inc:
I'd like to know if there's an option to do this, without having to patch the module. Many thanks again! |
Yes, I see that now. From what I can tell, that switch is hard-coded, so there is no current way to avoid the switch. But it looks like it may be possible to add a configuration option to the UI to skip this change - that shouldn't be too difficult, I think. |
See also this issue on the Feeds issue queue on drupal.org: https://www.drupal.org/project/feeds/issues/3375914 I think that there is a workaround possible. |
Yes, that workaround should be possible, but it would affect all importers in your site. The D7 variable |
Well, you could conditionally override |
Thank you both for your answers. I'll take a look and try to add a UI config option to disable the user switch. |
One of the major changes in the latest Drupal 7 versions was that the imports are ran as the user 1, when using the standalone import form (see here).
We woder if there is any option to disable this, and run the import with the current user, like it was before? We're experiencing some problems, because we need the current user to store some data on the database, during the parse of the feed.
Thanks!
The text was updated successfully, but these errors were encountered: