Class: UcbRailsUser::UserSessionManager::InPeopleOuAddToUsersTable

Inherits:
ActiveInUserTable show all
Defined in:
app/models/ucb_rails_user/user_session_manager/in_people_ou_add_to_users_table.rb

Instance Attribute Summary

Attributes inherited from Base

#uid

Instance Method Summary collapse

Methods inherited from ActiveInUserTable

#current_user

Methods inherited from Base

#current_user, current_user, current_user=, #log_request, #logout, #people_ou_entry

Instance Method Details

#login(uid) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
# File 'app/models/ucb_rails_user/user_session_manager/in_people_ou_add_to_users_table.rb', line 6

def (uid)
  self.uid = uid

  if people_ou_entry.present?
    UcbRailsUser::UserLdapService.create_or_update_user_from_entry(people_ou_entry).tap do |user|
      user.touch(:last_login_at)
    end
  else
    nil
  end
end