token.destroy
session[:user] = user.id
- cookies["_osm_username"] = user.display_name
+ cookies.permanent["_osm_username"] = user.display_name
if referer.nil?
flash[:notice] = t('user.confirm.success') + "<br /><br />" + t('user.confirm.before you start')
end
token.destroy
session[:user] = @user.id
- cookies["_osm_username"] = @user.display_name
+ cookies.permanent["_osm_username"] = @user.display_name
redirect_to :action => 'account', :display_name => @user.display_name
else
flash[:error] = t 'user.confirm_email.failure'
##
# process a successful login
def successful_login(user)
- cookies["_osm_username"] = user.display_name
+ cookies.permanent["_osm_username"] = user.display_name
session[:user] = user.id
session_expires_after 1.month if session[:remember_me]