mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-05 15:31:47 +01:00
No point in changing the name of the OpenID identity column in users table. Use the existing one.
This commit is contained in:
parent
c46e5a9e1d
commit
611a53e668
5 changed files with 19 additions and 23 deletions
|
|
@ -96,7 +96,7 @@ class LoginController < ApplicationController
|
|||
session['noexpiry'] ||= params['user_noexpiry']
|
||||
authenticate_with_open_id do |result, identity_url|
|
||||
if result.successful?
|
||||
if @user = User.find_by_identity_url(identity_url)
|
||||
if @user = User.find_by_open_id_url(identity_url)
|
||||
session['user_id'] = @user.id
|
||||
msg = (should_expire_sessions?) ? "will expire after 1 hour of inactivity." : "will not expire."
|
||||
notify :notice, "Login successful: session #{msg}"
|
||||
|
|
|
|||
|
|
@ -154,7 +154,7 @@ class UsersController < ApplicationController
|
|||
# error. If info is nil, it means that the user cancelled
|
||||
# the verification.
|
||||
@user.auth_type = 'open_id'
|
||||
@user.identity_url = identity_url
|
||||
@user.open_id_url = identity_url
|
||||
if @user.save
|
||||
notify :notice, "You have successfully verified #{identity_url} as your identity and set your authentication type to Open ID."
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue