Class: MuckUsers::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/muck-users/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/muck-users/config.rb', line 35

def initialize
  self.use_http_status_failures = false
  self.automatically_activate = true
  self. = true
  self.send_welcome = true
  self.use_recaptcha = false
  self. = false
  self.require_access_code = false
  self.validate_terms_of_service = false
  self.send_access_code_request_confirm = false
  self. = true
end

Instance Attribute Details

#automatically_activateObject

Returns the value of attribute automatically_activate.



14
15
16
# File 'lib/muck-users/config.rb', line 14

def automatically_activate
  @automatically_activate
end

#automatically_login_after_account_createObject

Automatically active a users account during registration. If true the user won’t get a ‘confirm account’ email. If false then the user will need to confirm their account via an email.



16
17
18
# File 'lib/muck-users/config.rb', line 16

def 
  @automatically_login_after_account_create
end

#include_signup_scriptsObject

If true then javscript will be added to the sign up form that indicates if login/email are available. Default is true.



33
34
35
# File 'lib/muck-users/config.rb', line 33

def 
  @include_signup_scripts
end

#let_users_delete_their_accountObject

This will turn on recaptcha during registration. This is an alternative to sending the user a confirm email and can help reduce spam registrations.



24
25
26
# File 'lib/muck-users/config.rb', line 24

def 
  @let_users_delete_their_account
end

#require_access_codeObject

Turn on/off ability for users to delete their own account. It is not recommended that you let users delete their own accounts since the delete can cascade through the system with unknown results.



27
28
29
# File 'lib/muck-users/config.rb', line 27

def require_access_code
  @require_access_code
end

#send_access_code_request_confirmObject

Determines whether or not to send a confirmation email after a user requests an access code.



30
31
32
# File 'lib/muck-users/config.rb', line 30

def send_access_code_request_confirm
  @send_access_code_request_confirm
end

#send_welcomeObject

Automatically log the user in after they have setup their account. This should be false if you require them to activate their account.



18
19
20
# File 'lib/muck-users/config.rb', line 18

def send_welcome
  @send_welcome
end

#use_http_status_failuresObject

This only applies to json requests



31
32
33
# File 'lib/muck-users/config.rb', line 31

def use_http_status_failures
  @use_http_status_failures
end

#use_recaptchaObject

if you use recaptcha you will need to also provide a public and private key available from recaptcha.net.



21
22
23
# File 'lib/muck-users/config.rb', line 21

def use_recaptcha
  @use_recaptcha
end

#validate_terms_of_serviceObject

Require that the accept terms of service before signing up.



28
29
30
# File 'lib/muck-users/config.rb', line 28

def validate_terms_of_service
  @validate_terms_of_service
end