Index: openacs-4/packages/acs-admin/www/users/member-state-change-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/users/Attic/member-state-change-oracle.xql,v
diff -u -r1.8 -r1.9
--- openacs-4/packages/acs-admin/www/users/member-state-change-oracle.xql	7 Aug 2017 23:47:45 -0000	1.8
+++ openacs-4/packages/acs-admin/www/users/member-state-change-oracle.xql	30 May 2018 15:44:09 -0000	1.9
@@ -3,19 +3,6 @@
 <queryset>
    <rdbms><type>oracle</type><version>8.1.6</version></rdbms>
 
-    <fullquery name="get_states">
-        <querytext>
-            select email_verified_p as email_verified_p_old,
-                   member_state as member_state_old,
-                   first_names || ' ' || last_name as name,
-                   email,
-                   rel_id
-            from cc_users
-            where user_id = :user_id
-        </querytext>
-    </fullquery>
-
-
 <fullquery name="approve_email">
       <querytext>
                        begin acs_user.approve_email ( user_id => :user_id ); end;
Index: openacs-4/packages/acs-admin/www/users/member-state-change-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/users/Attic/member-state-change-postgresql.xql,v
diff -u -r1.8 -r1.9
--- openacs-4/packages/acs-admin/www/users/member-state-change-postgresql.xql	8 Nov 2010 23:09:10 -0000	1.8
+++ openacs-4/packages/acs-admin/www/users/member-state-change-postgresql.xql	30 May 2018 15:44:09 -0000	1.9
@@ -3,22 +3,6 @@
 <queryset>
    <rdbms><type>postgresql</type><version>7.1</version></rdbms>
 
-<fullquery name="get_states">      
-      <querytext>
-      select u.email_verified_p as email_verified_p_old,
-          mr.member_state as member_state_old,
-          per.first_names || ' ' || per.last_name as name,
-          part.email, mr.rel_id
-      from users u
-      JOIN parties part on (part.party_id = u.user_id)
-        JOIN persons per on (per.person_id = u.user_id)
-      LEFT JOIN membership_rels mr on (mr.rel_id = u.user_id)
-      where u.user_id = :user_id
-      
-      </querytext>
-</fullquery>
-
-
 <fullquery name="approve_email">
 	<querytext>
 	select acs_user__approve_email (:user_id);
Index: openacs-4/packages/acs-admin/www/users/member-state-change.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/users/member-state-change.tcl,v
diff -u -r1.21 -r1.22
--- openacs-4/packages/acs-admin/www/users/member-state-change.tcl	21 Jan 2018 00:38:38 -0000	1.21
+++ openacs-4/packages/acs-admin/www/users/member-state-change.tcl	30 May 2018 15:44:09 -0000	1.22
@@ -24,12 +24,21 @@
     return_url:onevalue
 }
 
-if {![db_0or1row get_states {}]} {
+if {![db_0or1row get_states {
+    select member_state as member_state_old,
+           email_verified_p as email_verified_p_old
+    from users where user_id = :user_id
+}]} {
     # The user is not in there
     ad_return_complaint 1 "Invalid User: the user is not in the system"
     return
 }
 
+set user [acs_user::get -user_id $user_id]
+set name   [dict get $user name]
+set email  [dict get $user email]
+set rel_id [dict get $user rel_id]
+
 #
 # This page is used for state changes in the member_state, and as well
 # on email confirm require and approve operations.
@@ -80,7 +89,7 @@
 callback acs_admin::member_state_change -member_state $member_state -user_id $user_id
 
 set admin_user_id [ad_conn user_id]
-set email_from [db_string admin_email {select email from parties where party_id = :admin_user_id}]
+set email_from [acs_user::get_element -user_id $admin_user_id -element email]
 set subject $action
 set message $email_message
 
Fisheye: Tag 1.4 refers to a dead (removed) revision in file `openacs-4/packages/acs-admin/www/users/member-state-change.xql'.
Fisheye: No comparison available.  Pass `N' to diff?