From d9a018a75002bba009e60eaa87a5fb8276233c4e Mon Sep 17 00:00:00 2001 From: erdgeist Date: Sun, 2 Aug 2026 18:59:08 +0200 Subject: Witness account creation --- app/models/user.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'app/models/user.rb') 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 redaktion? end + def save_witnessed(actor:) + saved = false + transaction do + saved = save + raise ActiveRecord::Rollback unless saved + NodeAction.record!(:participants => [self], :user => actor, + :action => "user_create", :target_login => login) + end + saved + end + def deactivate!(actor:) return false if alumni? transaction do -- cgit v1.3