<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.28.0">
</HEAD>
<BODY>
Hi Rob<BR>
I seem to remember tackling this before by adding a new submit handler to the user register form for a particular path which reflected the role.<BR>
and making sure the submit handler ran after user_register_submit. In the submit handler I then ran db_query to update the user status in the db.<BR>
<BR>
Lee<BR>
<BR>
<BR>
On Sun, 2010-08-15 at 18:36 -0700, Rob Koberg wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
Bueller?

Based on how a user registers, how can I set one group of users to be
blocked after registration and another group that is not blocked?

The current code is:

$merge_data['status'] = variable_get('user_register', 1) == 1;

so there is no way to allow for more than one 'Public registrations'.
I have seen loggintobaggan. Perhaps there could be a setting to allow
a filter to provide access.

$merge_data['status'] = $form_state['status'] ? $form_state['status']
: variable_get('user_register', 1) == 1;

Or is there some other way than modifying the core to prevent
$merge_data['status'] = variable_get('user_register', 1) == 1; ? Is it
possible to completely override the user_register_submit() somehow?

-Rob

On Sat, Aug 14, 2010 at 4:29 PM, Rob Koberg &lt;<A HREF="mailto:rob@koberg.com">rob@koberg.com</A>&gt; wrote:
&gt; Hi,
&gt;
&gt; New to Drupal and relatively new to PHP.
&gt;
&gt; I have been working on a COPPA module to constrain the registration
&gt; process on a non-profit site for young girls. COPPA is important
&gt; because it is a legal requirement to slightly filter the usage of a
&gt; web site by a person under 13 in the U.S (for any site that registers
&gt; users). I have looked at and tried:
&gt;
&gt; <A HREF="http://drupal.org/project/coppa">http://drupal.org/project/coppa</A>
&gt;
&gt; I don't see it doing much, or perhaps it is under documented? Anyway,
&gt; I have two sets of users:
&gt;
&gt; * over 13: These users can register, get an email, and access the site
&gt; right away
&gt;
&gt; * under 13: These users are initially blocked. At registration time,
&gt; when it is determined they are under 13, a &nbsp;lightbox comes up with
&gt; fields for the parent/guardian name, email and email confirm.
&gt;
&gt; So I want two different settings for their /admin/user/settings/Public
&gt; registrations, blocked and not blocked. The code in user.module has:
&gt;
&gt; if (!$admin) {
&gt; &nbsp; &nbsp;// Set the user's status because it was not displayed in the form.
&gt; &nbsp; &nbsp;$merge_data['status'] = variable_get('user_register', 1) == 1;
&gt; &nbsp;}
&gt;
&gt; I would like to have a way to block('administrator approval is
&gt; required')/unblock('no administrator approval is required') the user
&gt; based on age. I just use the &quot;block('administrator approval is
&gt; required')&quot; as a way to reuse the admin user settings emails. Actually
&gt; what happens is the parent is emailed an URL, and when they click it
&gt; the user's status is set to 1.
&gt;
&gt; The only way I could see to do this (remember, newbie) was to change
&gt; the above user.module code to:
&gt;
&gt; if (!$admin) {
&gt; &nbsp; &nbsp;// Set the user's status because it was not displayed in the form.
&gt; &nbsp; &nbsp;$merge_data['status'] = $form_state['status'] ?
&gt; $form_state['status'] : variable_get('user_register', 1) == 1;
&gt; &nbsp;}
&gt;
&gt; I realize this should not be in a site that does not control the
&gt; $form_state['status'], but is there some cleaner way to do this
&gt; without changing a base module?
&gt;
&gt; thanks,
&gt; -Rob
&gt;
</PRE>
</BLOCKQUOTE>
<BR>
</BODY>
</HTML>