mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-11-17 14:32:34 +08:00
Hotfix 1.6.1
Set confirmed_at to created_at when using no email confirmations and users sign up by themselves.
This commit is contained in:
parent
e16c826bb1
commit
ef688feb4e
3 changed files with 7 additions and 6 deletions
|
|
@ -146,6 +146,11 @@ class Users::RegistrationsController < Devise::RegistrationsController
|
|||
# this must be called after @org variable is defined. Otherwise this
|
||||
# variable won't be accessable in view.
|
||||
super do |resource|
|
||||
# Set the confirmed_at == created_at IF not using email confirmations
|
||||
unless Rails.configuration.x.enable_email_confirmations
|
||||
resource.update(confirmed_at: resource.created_at)
|
||||
end
|
||||
|
||||
if resource.valid? && resource.persisted?
|
||||
@org.created_by = resource # set created_by for oraganization
|
||||
@org.save
|
||||
|
|
|
|||
|
|
@ -161,11 +161,7 @@ class User < ActiveRecord::Base
|
|||
|
||||
# Whether user is active (= confirmed) or not
|
||||
def active?
|
||||
if confirmation_required?
|
||||
confirmed_at.present?
|
||||
else
|
||||
invited_by.present? ? invitation_accepted? : true
|
||||
end
|
||||
confirmed_at.present?
|
||||
end
|
||||
|
||||
def active_status_str
|
||||
|
|
|
|||
|
|
@ -186,7 +186,7 @@ class Constants
|
|||
#=============================================================================
|
||||
|
||||
# Application version
|
||||
APP_VERSION = '1.6.0'.freeze
|
||||
APP_VERSION = '1.6.1'.freeze
|
||||
|
||||
TEXT_EXTRACT_FILE_TYPES = [
|
||||
'application/pdf',
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue