app/models/users/authentication.rb in fat_free_crm-0.11.4 vs app/models/users/authentication.rb in fat_free_crm-0.12.0

- old
+ new

@@ -1,22 +1,10 @@ -# Fat Free CRM -# Copyright (C) 2008-2011 by Michael Dvorkin +# Copyright (c) 2008-2013 Michael Dvorkin and contributors. # -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. +# Fat Free CRM is freely distributable under the terms of MIT license. +# See MIT-LICENSE file or http://www.opensource.org/licenses/mit-license.php #------------------------------------------------------------------------------ - class Authentication < Authlogic::Session::Base # NOTE: This is not ActiveRecord model. authenticate_with User after_save :check_if_suspended def to_key @@ -58,7 +46,8 @@ #---------------------------------------------------------------------------- def check_if_suspended self.errors.add(:base, I18n.t(:msg_account_suspended)) if self.user.suspended? end -end + ActiveSupport.run_load_hooks(:fat_free_crm_authentication, self) +end