Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

autologin in authlogic Rails

I have added auhlogic in my Rails app to authenticate users. I have also included the code from the Reset password tutorial . All of it works, the only issue I have is that once a user registers he gets automatically logged in.

Anyone worked with authlogic, what would be the best & fastest way to disable the autologin after the registration?

like image 445
Adnan Avatar asked Nov 28 '22 19:11

Adnan


1 Answers

You can use #save_without_session_maintenance:

@user = User.new(params[:user])
@user.save_without_session_maintenance
like image 181
Ptico Avatar answered Dec 07 '22 00:12

Ptico