From 8d544d58af232e82c740cfcb271d20965020c133 Mon Sep 17 00:00:00 2001
From: Freya Murphy <freya@freyacat.org>
Date: Tue, 21 May 2024 21:11:19 -0400
Subject: things

---
 src/db/rest/user/api_user_update.sql | 20 --------------------
 1 file changed, 20 deletions(-)

(limited to 'src/db/rest/user/api_user_update.sql')

diff --git a/src/db/rest/user/api_user_update.sql b/src/db/rest/user/api_user_update.sql
index 2e7cd50..c26c680 100644
--- a/src/db/rest/user/api_user_update.sql
+++ b/src/db/rest/user/api_user_update.sql
@@ -32,25 +32,6 @@ BEGIN
 		_changed = TRUE;
 	END IF;
 
-	-- password
-	SELECT password
-		INTO OLD.password
-		FROM admin.user
-		WHERE id = OLD.id;
-
-	NEW.password = COALESCE(NEW.password, OLD.password);
-	NEW.password := _api.trim(NEW.password);
-	PERFORM _api.validate_text(
-		_text => NEW.password,
-		_column => 'password',
-		_min => 1,
-		_max => 256
-	);
-
-	IF NEW.password IS DISTINCT FROM OLD.password THEN
-		_changed = TRUE;
-	END IF;
-
 	-- first name
 	NEW.first_name = COALESCE(NEW.first_name, OLD.first_name);
 	NEW.first_name := _api.trim(NEW.first_name);
@@ -138,7 +119,6 @@ BEGIN
 	IF _changed THEN
 		UPDATE admin.user SET
 			username = NEW.username,
-			password = NEW.password,
 			first_name = NEW.first_name,
 			last_name = NEW.last_name,
 			middle_name = NEW.middle_name,
-- 
cgit v1.2.3-freya

