Class: MuckUsers::Configuration
- Inherits:
-
Object
- Object
- MuckUsers::Configuration
- Defined in:
- lib/muck-users/config.rb
Instance Attribute Summary collapse
-
#automatically_activate ⇒ Object
Returns the value of attribute automatically_activate.
-
#automatically_login_after_account_create ⇒ Object
Automatically active a users account during registration.
-
#include_signup_scripts ⇒ Object
If true then javscript will be added to the sign up form that indicates if login/email are available.
-
#let_users_delete_their_account ⇒ Object
This will turn on recaptcha during registration.
-
#require_access_code ⇒ Object
Turn on/off ability for users to delete their own account.
-
#send_access_code_request_confirm ⇒ Object
Determines whether or not to send a confirmation email after a user requests an access code.
-
#send_welcome ⇒ Object
Automatically log the user in after they have setup their account.
-
#use_http_status_failures ⇒ Object
This only applies to json requests.
-
#use_recaptcha ⇒ Object
if you use recaptcha you will need to also provide a public and private key available from recaptcha.net.
-
#validate_terms_of_service ⇒ Object
Require that the accept terms of service before signing up.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
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.automatically_login_after_account_create = true self.send_welcome = true self.use_recaptcha = false self.let_users_delete_their_account = false self.require_access_code = false self.validate_terms_of_service = false self.send_access_code_request_confirm = false self.include_signup_scripts = true end |
Instance Attribute Details
#automatically_activate ⇒ Object
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_create ⇒ Object
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 @automatically_login_after_account_create end |
#include_signup_scripts ⇒ Object
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 @include_signup_scripts end |
#let_users_delete_their_account ⇒ Object
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 @let_users_delete_their_account end |
#require_access_code ⇒ Object
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_confirm ⇒ Object
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_welcome ⇒ Object
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_failures ⇒ Object
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_recaptcha ⇒ Object
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_service ⇒ Object
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 |