diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-06-27 22:52:50 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-06-27 22:52:50 +0200 |
| commit | 9a19a0494ef51cdac9a78e24d517ca48ba44c453 (patch) | |
| tree | 8eaae12d8047a40e29d3ea7ff3116b5c869e04bd /app/models/user.rb | |
| parent | 85a01e35274b8d4d4165a7b26bd7986e211246bb (diff) | |
| parent | 1853082fcd8c067390c246f9daa01a9b47387497 (diff) | |
Migration from Rails 2.3.5 to Rails 8.1 successful.
Merging dev branch.
Diffstat (limited to 'app/models/user.rb')
| -rw-r--r-- | app/models/user.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index ce5503f..92ac33a 100644 --- a/app/models/user.rb +++ b/app/models/user.rb | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | require 'digest/sha1' | 1 | require 'digest/sha1' |
| 2 | 2 | ||
| 3 | class User < ActiveRecord::Base | 3 | class User < ApplicationRecord |
| 4 | # Mixins and Plugins | 4 | # Mixins and Plugins |
| 5 | include Authentication | 5 | include Authentication |
| 6 | include Authentication::ByPassword | 6 | include Authentication::ByPassword |
| @@ -21,8 +21,6 @@ class User < ActiveRecord::Base | |||
| 21 | validates_format_of :email, :with => Authentication.email_regex, | 21 | validates_format_of :email, :with => Authentication.email_regex, |
| 22 | :message => Authentication.bad_email_message | 22 | :message => Authentication.bad_email_message |
| 23 | 23 | ||
| 24 | attr_accessible :login, :email, :password, :password_confirmation, :admin | ||
| 25 | |||
| 26 | # Authenticates a user by their login name and unencrypted password. Returns the user or nil. | 24 | # Authenticates a user by their login name and unencrypted password. Returns the user or nil. |
| 27 | def self.authenticate(login, password) | 25 | def self.authenticate(login, password) |
| 28 | return nil if login.blank? || password.blank? | 26 | return nil if login.blank? || password.blank? |
