public
Description: The open source social networking platform in Ruby on Rails from the author of RailsSpace
Homepage: http://insoshi.com
Clone URL: git://github.com/insoshi/insoshi.git
Better account deactivation
Michael Hartl (author)
Wed Apr 23 19:16:14 -0700 2008
commit  8d6e727fa190d7d2404e31fbfd6206236a54c86e
tree    76b132ebd10a57a6a2649698cac1c19c3e7aad99
parent  8b446e3917702b311adaad57ac26fbe235b595db
...
19
20
21
22
23
 
 
 
 
 
 
24
25
26
...
19
20
21
 
 
22
23
24
25
26
27
28
29
30
0
@@ -19,8 +19,12 @@ class SessionsController < ApplicationController
0
           :value => self.current_person.remember_token,
0
           :expires => self.current_person.remember_token_expires_at }
0
       end
0
- redirect_back_or_default('/')
0
- flash[:success] = "Logged in successfully"
0
+ if current_person.deactivated?
0
+ destroy
0
+ else
0
+ flash[:success] = "Logged in successfully"
0
+ redirect_back_or_default('/')
0
+ end
0
     else
0
       @body = "login single-col"
0
       flash.now[:error] = "Invalid email/password combination"

Comments

    No one has commented yet.