Class: HubSsoLib::User

Inherits:
Object
  • Object
show all
Defined in:
lib/hub_sso_lib.rb

Overview

Class: User #

(C) Hipposoft 2006                                         #
                                                           #

Purpose: A representation of the Hub application’s User Model in #

terms of a simple set of properties, so that applications  #
don't need User access to understand user attributes.      #
                                                           #

Author: A.D.Hodgkinson #

#

History: 21-Oct-2006 (ADH): Created. #

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeUser

Returns a new instance of User.



340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
# File 'lib/hub_sso_lib.rb', line 340

def initialize
  @user_salt = nil
  @user_roles = nil
  @user_updated_at = nil
  @user_activated_at = nil
  @user_real_name = nil
  @user_crypted_password = nil
  @user_remember_token_expires_at = nil
  @user_activation_code = nil
  @user_member_id = nil
  @user_id = nil
  @user_password_reset_code = nil
  @user_remember_token = nil
  @user_email = nil
  @user_created_at = nil
  @user_password_reset_code_expires_at = nil
end

Instance Attribute Details

#user_activated_atObject

Returns the value of attribute user_activated_at.



327
328
329
# File 'lib/hub_sso_lib.rb', line 327

def user_activated_at
  @user_activated_at
end

#user_activation_codeObject

Returns the value of attribute user_activation_code.



331
332
333
# File 'lib/hub_sso_lib.rb', line 331

def user_activation_code
  @user_activation_code
end

#user_created_atObject

Returns the value of attribute user_created_at.



337
338
339
# File 'lib/hub_sso_lib.rb', line 337

def user_created_at
  @user_created_at
end

#user_crypted_passwordObject

Returns the value of attribute user_crypted_password.



329
330
331
# File 'lib/hub_sso_lib.rb', line 329

def user_crypted_password
  @user_crypted_password
end

#user_emailObject

Returns the value of attribute user_email.



336
337
338
# File 'lib/hub_sso_lib.rb', line 336

def user_email
  @user_email
end

#user_idObject

Returns the value of attribute user_id.



333
334
335
# File 'lib/hub_sso_lib.rb', line 333

def user_id
  @user_id
end

#user_member_idObject

Returns the value of attribute user_member_id.



332
333
334
# File 'lib/hub_sso_lib.rb', line 332

def user_member_id
  @user_member_id
end

#user_password_reset_codeObject

Returns the value of attribute user_password_reset_code.



334
335
336
# File 'lib/hub_sso_lib.rb', line 334

def user_password_reset_code
  @user_password_reset_code
end

#user_password_reset_code_expires_atObject

Returns the value of attribute user_password_reset_code_expires_at.



338
339
340
# File 'lib/hub_sso_lib.rb', line 338

def user_password_reset_code_expires_at
  @user_password_reset_code_expires_at
end

#user_real_nameObject

Returns the value of attribute user_real_name.



328
329
330
# File 'lib/hub_sso_lib.rb', line 328

def user_real_name
  @user_real_name
end

#user_remember_tokenObject

Returns the value of attribute user_remember_token.



335
336
337
# File 'lib/hub_sso_lib.rb', line 335

def user_remember_token
  @user_remember_token
end

#user_remember_token_expires_atObject

Returns the value of attribute user_remember_token_expires_at.



330
331
332
# File 'lib/hub_sso_lib.rb', line 330

def user_remember_token_expires_at
  @user_remember_token_expires_at
end

#user_rolesObject

Returns the value of attribute user_roles.



325
326
327
# File 'lib/hub_sso_lib.rb', line 325

def user_roles
  @user_roles
end

#user_saltObject

This *must not* be ‘undumped’, since it gets passed from clients back to the persistent DRb server process. A client thread may disappear and be recreated by the web server at any time; if the user object is undumpable, then the DRb server has to *call back to the client* (in DRb, clients are also servers…!) to find out about the object. Trouble is, if the client thread has been recreated, the server will be trying to access to stale objects that only exist if the garbage collector hasn’t got to them yet.



324
325
326
# File 'lib/hub_sso_lib.rb', line 324

def user_salt
  @user_salt
end

#user_updated_atObject

Returns the value of attribute user_updated_at.



326
327
328
# File 'lib/hub_sso_lib.rb', line 326

def user_updated_at
  @user_updated_at
end