i have this code * user_name=auth_decoded[0]* * password=auth_decoded[1]* * @user = User.find_by_email(user_name)* * if (@chkuser= (@user && @user.authenticate(password)))* The above snippet is not working, any solution...? Thank you vishnu -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/xC9bkjjukqwJ. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
i don''t know where "user_name" comes from but i think you are passing in user_name where you search for the email. "@user = User.find_by_email(user_name)" change it to: "@user = User.find_by_email(user_email)" or however your variable is called greets -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
>On Friday, 30 March 2012 04:25:48 UTC-4, Aaron Schmitz wrote: > > >i don''t know where "user_name" comes from but i think you are passing > >in user_name where you search for the email. >i think thats not a pblm, bcz here user_name basically that is an email address for login purpose, Have any another issues with that code? Thank you vishnu> >"@user = User.find_by_email(user_name)" > > >change it to: > > >"@user = User.find_by_email(user_email)" or however your variable is > called > > >greets-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/uA4iuXDgaNwJ. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
*user_name=auth_decoded[0]* * password=auth_decoded[1]* * @user = User.find_by_email(user_name)* * if (@chkuser= (@user && @user.authenticate(password)))* in the above code, this * @user.authenticate(password) *return*false...... * * * *Why like this....?* *Thank you* *vishnu * On Friday, 30 March 2012 06:56:21 UTC-4, amvis wrote:> > > > >On Friday, 30 March 2012 04:25:48 UTC-4, Aaron Schmitz wrote: >> >> >i don''t know where "user_name" comes from but i think you are passing >> >in user_name where you search for the email. >> > > i think thats not a pblm, bcz here user_name basically that is an email > address for login purpose, Have any another issues with that code? > > Thank you > vishnu > > > >> >"@user = User.find_by_email(user_name)" >> >> >change it to: >> >> >"@user = User.find_by_email(user_email)" or however your variable is >> called >> >> >greets > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/KMU5XJmaxcwJ. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.