Reference generic Preferences link - Solved

(Allen - Watchman Monitoring) #1

I’m redoing our welcome email and would like to include a link which any user could click to access their own preferences.

Is there a generic link I could use? ie http://fqdn/my/preferences

or perhaps a way to create a dynamic url like:

http://fqnd/users/{logged_in_user]/preferences ?


(Kane York) #2

Yes, this would be nice, not just for email, but just in general.

A rewriting route would work:

CASE: Logged in: Route to /users/{#username}/*
CASE: Not logged in: Route to /login ?

No, /login doesn’t work, and the copy is all wrong: /login now works!

It would be nice if an open-viewing forum could use that page too.

(Allen - Watchman Monitoring) #3

A sign-in page would do the trick, where the session could store the URL the visitor was initially trying to access.

I’m [still] trying to include a link to a users’ preferences page in en email , and I’m getting an error in sidekiq when trying to:

unsubscribe_link: "Control which emails you receive in your [user preferences](%{user_preferences_url})."

(Kane York) #4

By the way, the redirect to /login would work now, because on non-login_required sites it shows latest and opens the Login modal box.

Preferences redirect routes don't survive a login
(Allen - Watchman Monitoring) #5

That’s good news (login is required at our site).

Where would one begin to have a /preferences route auto-forward to /user/[myuser]/preferences?

(Allen - Watchman Monitoring) #6

Solved by

This URL is what I was looking for:


Will bring people where I want them to go.

(will go undo all the nonsense which was causing my sidekiq failures)

(Caue Rego) #7

But why /email_preferences instead of simply /preferences ?!

I was writing a whole new topic to request for this very same feature, and I’m very pleased to realize it already exists (thanks “your topic is similar to”!), but…

I did have to come all this way to figure it out while it would be so much more intuitive the other way!

Some statistics about topics NOT created?
(Kane York) #8

That link exists now: /my/preferences