-1

Is it possible to get the user id from the email confirmation token when the user confirms their email, rather than the user having to log back in?

From what I understand, it was easier in past versions of devise but may no longer be possible.

chris
  • 1,869
  • 4
  • 29
  • 52
  • they will be stored in the same model so should be easy to get regardless of devise – froderik Jan 14 '16 at 10:55
  • you will have access to the devise user resource in the confirmation. which includes the id of the user and you can always overwrite the confirmation controller if you need to. – Rajesh Sharma Jan 14 '16 at 16:53

1 Answers1

0

BAD IDEA USE ID AS FINDER your id can change... you should use some users' attributes for example email or uuid (social networks) or other uniq field...

but you can, I suggest use Rails verifier for creating confirmation links.

Oleh Sobchuk
  • 3,612
  • 2
  • 25
  • 41