Index: openacs-4/packages/acs-tcl/tcl/community-core-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/community-core-procs.tcl,v
diff -u -r1.49 -r1.50
--- openacs-4/packages/acs-tcl/tcl/community-core-procs.tcl 10 Jan 2007 21:22:12 -0000 1.49
+++ openacs-4/packages/acs-tcl/tcl/community-core-procs.tcl 5 Feb 2007 07:05:44 -0000 1.50
@@ -620,7 +620,28 @@
-privilege "admin"]
}
+ad_proc -public acs_user::registered_user_p {
+ {-user_id ""}
+} {
+ Return 1 if the specified user (defaults to logged in user)
+ is a registered user and 0 otherwise.
+ A registered user is a user who is in the view registered_users and
+ this is primarily true for any user who is approved and has a
+ verified e-mail.
+
+ @param user_id The id of the user to check.
+
+ @author Malte Sussdorff (malte.sussdorff@cognovis.de)
+} {
+ if { [empty_string_p $user_id]} {
+ set user_id [ad_conn user_id]
+ }
+
+ return [db_string registered_user_p {} -default 0]
+}
+
+
ad_proc -public acs_user::ScreenName {} {
Get the value of the ScreenName parameter. Checked to ensure that it only returns none, solicit, or require.
} {
Index: openacs-4/packages/acs-tcl/tcl/community-core-procs.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/community-core-procs.xql,v
diff -u -r1.17 -r1.18
--- openacs-4/packages/acs-tcl/tcl/community-core-procs.xql 4 Jun 2006 00:45:47 -0000 1.17
+++ openacs-4/packages/acs-tcl/tcl/community-core-procs.xql 5 Feb 2007 07:05:44 -0000 1.18
@@ -137,6 +137,16 @@
+
+
+
+ select 1
+ from registered_users
+ where user_id = :user_id
+
+
+
+
Index: openacs-4/packages/acs-tcl/tcl/test/acs-tcl-test-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/test/acs-tcl-test-procs.tcl,v
diff -u -r1.37 -r1.38
--- openacs-4/packages/acs-tcl/tcl/test/acs-tcl-test-procs.tcl 10 Jan 2007 21:22:12 -0000 1.37
+++ openacs-4/packages/acs-tcl/tcl/test/acs-tcl-test-procs.tcl 5 Feb 2007 07:05:45 -0000 1.38
@@ -1090,3 +1090,4 @@
set package_id [db_string get_package_id "select package_id from acs_objects where object_id = :object_id"]
aa_true "package_id returned is correct" [string equal $package_id [acs_object::package_id -object_id $object_id]]
}
+