Class: UcbRailsUser::UserSessionManager::ActiveInUserTable
- Defined in:
- app/models/ucb_rails_user/user_session_manager/active_in_user_table.rb
Direct Known Subclasses
AdminInUserTable, InPeopleOuAddToUsersTable, TestSessionManager
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
current_user, current_user=, #log_request, #logout, #people_ou_entry
Instance Method Details
#current_user(uid) ⇒ Object
17 18 19 |
# File 'app/models/ucb_rails_user/user_session_manager/active_in_user_table.rb', line 17 def current_user(uid) User.find_by_ldap_uid(uid) end |
#login(uid) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 |
# File 'app/models/ucb_rails_user/user_session_manager/active_in_user_table.rb', line 5 def login(uid) self.uid = uid if user_table_entry && people_ou_entry UcbRailsUser::UserLdapService.update_user_from_ldap_entry(people_ou_entry).tap do |user| user.touch(:last_login_at) end else false end end |