-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Error with user sign-up and confirmation #193
Comments
I just tried it and I cannot reproduce. Can you please create a small application and publish on Github so I can investigate further? |
To be more specific, it's ok to appear "You have signed up successfully." but it's not ok to increase the sign_in_count neither be able to sign in. About the "true" and "flash_user_signed_up", you will have to check if the value inside the flash message is a String before showing it. |
Oddly, I can't reproduce the logging in without confirming error on the test app either. Here it is in case you want to poke around: http://github.com/greenplastik/Devise-Test-App Obviously the username and password in the mailer.rb in initializers needs to be changed. |
Are you overwriting the method "active?" in your models? Or have a column named "active"? |
I have an active column in my other app on a completely unrelated model. Not on the user model though. I fixed the "true" thing in the flash message by making sure that the flash message is of class String before outputting it, like you suggested. That worked like a charm. I'll play around some more on my other app to try to isolate the issue with the login despite lack of confirmation. |
Ok, please let us know when you find something! |
So I finally figured out what the issue was, and it was something obvious and not having to do with Devise (which now works wonderfully). We transitioned our app from Authlogic, and during the constant branching and testing to get things to work as we transitioned, we never removed the old UserController, which must have caused some problems. By the way, have you guys ever considered allowing people to create their own RegistrationsController, which inherits from the one in your gem. In case they want to overwrite some things. Or does that already work? |
That is available in 1.1 for Rails 3 |
See? Now I have to upgrade all my apps to Rails 3. shakes fist |
You could just not use the one in devise and create your own anyway |
Confirm this bug Ruby: 1.8.7 (p249) devise :registerable, :database_authenticatable, :confirmable, .... When user sign_up correct email with confirmation url send to email, when user log_out its may login again without any confirmation steps via emai Also confirm bug with word TRUE in output before flash on root page ( after sucsessfuly sign_up with confirmable set on) true << this is BUGYou have signed up successfully.
|
Confirmation on the flash/true bug. Rails 2.3.8, Ruby 1.8.7, Devise 1.0.6 |
You can check if the flash message is a string before showing up in your views. |
Versions:
Ruby: 1.8.7 (p249)
Rails: 2.3.5
Devise (gem): 1.0.6
User.rb:
class User < ActiveRecord::Base
devise :registerable, :database_authenticatable, :confirmable, :recoverable, :rememberable, :trackable, :validatable, :lockable, :timeoutable, :timeout_in => 2.hours
...
end
When I sign up a new user, it creates the user in the DB, it creates the confirmation_token and sends the confirmation email.
However, it also appears to be skipping the confirmation process, because it is redirecting to the home site and giving me the flash message of "You have signed up successfully." with the word "true" above it (inside of a div with the id "flash_user_signed_up"). Furthermore, the user's "Profile" link and the "Sign out" link show up, even though they only should if the user is logged in.
My development.log shows the user's sign_in_count incrementing. So it's definitely logging the user in. If I log out and try logging the user in manually, it lets it log in, even though I have not yet clicked the confirmation link.
Then, if I click the confirmation link, it gives me the account successfully confirmed message.
I haven't unpacked and/or changed the devise gem. Any thoughts?
The text was updated successfully, but these errors were encountered: