Forgotten Password
Posted: 05 March 2010 02:51 PM   [ Ignore ]
Member
RankRankRank
Total Posts:  66
Joined  2009-10-24

Sometimes a client needs to get their forgotten password.  Since we don’t keep those on file, we suggest using the “forgot password” and reset link.

No matter what, it says “please enter a valid email address” once we enter an email that we know should be registered.

We did move things to single sub-domain so that could be part of the problem?

Profile
 
 
Posted: 17 March 2010 04:24 PM   [ Ignore ]   [ # 1 ]
Administrator
RankRankRankRank
Total Posts:  249
Joined  2008-12-18

When you move to a single application subdomain you’ll need to make modifications to your “forgot_password” action. Here’s the default code:

account Account.find_by_subdomain(request.subdomains.first)
      
user User.find(:first, :conditions => ["email =? AND account_id =?"params[:email]account.id]

Since you no longer make use of subdomains you’ll need to ditch the account lookup and probably change the user lookup to:

user User.find(:first, :conditions => ["email =?"params[:email]]

So you no longer have the account dependency and can find a user directly from their email address. Let me know if that doesn’t work out.

Profile
 
 
   
 
 
‹‹ Garmin issues      deployment hangs ››