- Issue created by @ressa
- Status changed to Needs review
over 1 year ago 1:21pm 5 June 2023 - 🇩🇰Denmark ressa Copenhagen
Thanks! But perhaps shouldn't there be a configuration form to define this? I'll add this to the
- Status changed to Needs work
over 1 year ago 6:03pm 5 June 2023 - 🇨🇦Canada alberto56
I'll change the title because what we want here is a "default" URL. (The default is currently the user page).
This should not be confounded with the possibility, currently available, of defining a destination, by appending ?destination=/admin/index, for example, to the URL.
For example, this can be added to the "forgot my password" messages at /admin/config/people/accounts
We can also do this in drush like this:
echo $(drush uli)?destination=/admin/index
Right now, if there is no "destination" parameter, we display the user page.
I didn't test the patch, but looking at the patch, it seems that the login form would redirect even if we're not using the ULI (even if we're logging in with our username and password). If that is the case, this would be outside the scope of this module.
- Status changed to Active
over 1 year ago 7:37pm 5 June 2023 - 🇩🇰Denmark ressa Copenhagen
Thanks for making the title more precise @alberto56, and also for the tip about appending a destination. This works well in Linux, to also open it in the browser:
xdg-open $(drush uli)?destination=/categories
.But before we actually build a solution, we should probably discuss if it's a good idea or not, now that we have the appending a URL parameter as a possible workaround.
What speaks for having it as a setting, is that different projects can have different default URLs, so you don't have to constantly make sure you're firing off
xdg-open $(drush uli)?destination=/categories
and notxdg-open $(drush uli)?destination=/node/add
, in two different projects, with different needs.xdg-open $(drush uli)
would be enough.Thinking more about it, it should probably be a per user setting ... and then it maybe is too much work for too little gain ... what do you think? I'd be ready to close it as working as designed.
- Status changed to Closed: works as designed
over 1 year ago 8:33pm 5 June 2023 - 🇨🇦Canada alberto56
Interesting. I think it probably is about whoever crafts the ULI to determine what landing page they want and append "?destination=xxx" to the ULI. Because this is already a core functionality, it's probably best not to not reproduce it here.
For example, I maintain a module which provides links on a source website to allow access to a destination website, logging the user in if they are not already logged in. In that module I plan in https://www.drupal.org/project/multiaccess/issues/3364969 ✨ Allow propagating the "destination" parameter to destination sites Fixed to leverage the "destination" parameter to allow redirecting users to a given path, and logging them if they're not already logged in.
Similarly, the https://www.drupal.org/project/one_time_login_link_admin → allows admins to provide other users with a ULI. Currently that ULI is not customizable with a "destination" parameter but that would be a nice feature.
Another reason for having the destination managed by whoever creates the link is that, then, they will no longer be dependent on this module to have the functionality of redirecting the user to a specific page; because it is a core feature.
Based on the above, and the previous comment, I will close this as works as designed. Thanks!
- 🇩🇰Denmark ressa Copenhagen
Yes, it's probably best to leave the destination in the hands of core, I agree.
We can always revisit this issue, when ULI Custom Workflow gets included in core, and then add the functionality :)