summaryrefslogtreecommitdiff
path: root/app/models/user.rb
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-08-02 18:59:08 +0200
committererdgeist <erdgeist@erdgeist.org>2026-08-02 18:59:08 +0200
commitd9a018a75002bba009e60eaa87a5fb8276233c4e (patch)
tree33335d1c861b01039e13b6e94be214e1b284eb6a /app/models/user.rb
parent833c59abf109943e857f64e526f6434e095242d6 (diff)
Witness account creation
Diffstat (limited to 'app/models/user.rb')
-rw-r--r--app/models/user.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index 4b70ebe5..49c22584 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -117,6 +117,17 @@ class User < ApplicationRecord
117 redaktion? 117 redaktion?
118 end 118 end
119 119
120 def save_witnessed(actor:)
121 saved = false
122 transaction do
123 saved = save
124 raise ActiveRecord::Rollback unless saved
125 NodeAction.record!(:participants => [self], :user => actor,
126 :action => "user_create", :target_login => login)
127 end
128 saved
129 end
130
120 def deactivate!(actor:) 131 def deactivate!(actor:)
121 return false if alumni? 132 return false if alumni?
122 transaction do 133 transaction do