[development] [support] Administer a subset of users (sivaji j.g)
Sarah Vardy
s.vardy1 at uq.edu.au
Sun Sep 5 22:22:14 UTC 2010
Hi Sivaji,
Not sure how comfortable you are with PHP. I achieved this through a hack around using PHP in a node. Go here for more details:
http://drupal.org/node/901078
Hope this helps.
Cheers,
scarer
On 04/09/2010, at 10:00 PM, <development-request at drupal.org> wrote:
> Send development mailing list submissions to
> development at drupal.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://lists.drupal.org/mailman/listinfo/development
> or, via email, send a message with subject or body 'help' to
> development-request at drupal.org
>
> You can reach the person managing the list at
> development-owner at drupal.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of development digest..."
>
>
> Today's Topics:
>
> 1. Re: Form fields in a table (Jeff Greenberg)
> 2. Re: Form fields in a table (John Fiala)
> 3. Re: Form fields in a table (Jeff Greenberg)
> 4. Re: [support] Administer a subset of users (sivaji j.g)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Fri, 03 Sep 2010 15:31:06 -0400
> From: Jeff Greenberg <jeff at ayendesigns.com>
> Subject: Re: [development] Form fields in a table
> To: development at drupal.org
> Message-ID: <4C814CFA.1030004 at ayendesigns.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> I -had- forgotten #tree, and have added hook_theme and (I think) had
> drupal_render on all those fields, but that hasn't put the elements in
> the table.
> http://pastebin.com/rR9N5LfG
>
> On 09/03/2010 01:31 PM, John Fiala wrote:
>> If you're still having trouble after this, I suggest cutting/pasting
>> some code into a pastebin website and providing the link here so we
>> can see it more clearly.
>
>
> ------------------------------
>
> Message: 2
> Date: Fri, 3 Sep 2010 13:59:07 -0600
> From: John Fiala <jcfiala at gmail.com>
> Subject: Re: [development] Form fields in a table
> To: development at drupal.org
> Message-ID:
> <AANLkTik7ycgv79oNrR=Cyz5DfHJRywZQ7mDQJ_JC=15A at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hm. I'm wondering if $elements['table'] actually exists. Try
> http://pastebin.com/xU4F7C0m - pay attention to lines 51 through 58,
> that's where I made changes.
>
> Basically, I think the problem is that the $elements item _is_ the
> 'table' level, and that's why you're not finding your rows. And it's
> important to use $elements[$k] instead of $f, because drupal_render's
> changes need to go back to the calling function.
>
>
> On Fri, Sep 3, 2010 at 1:31 PM, Jeff Greenberg <jeff at ayendesigns.com> wrote:
>> I -had- forgotten #tree, and have added hook_theme and (I think) had
>> drupal_render on all those fields, but that hasn't put the elements in the
>> table.
>> http://pastebin.com/rR9N5LfG
>>
>> On 09/03/2010 01:31 PM, John Fiala wrote:
>>>
>>> If you're still having trouble after this, I suggest cutting/pasting
>>> some code into a pastebin website and providing the link here so we
>>> can see it more clearly.
>>
>
>
>
> --
> John Fiala
> www.jcfiala.net
>
>
> ------------------------------
>
> Message: 3
> Date: Fri, 03 Sep 2010 16:13:02 -0400
> From: Jeff Greenberg <jeff at ayendesigns.com>
> Subject: Re: [development] Form fields in a table
> To: development at drupal.org
> Message-ID: <4C8156CE.90908 at ayendesigns.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Ah, yes, defintey ['table'] was an issue. I've made those changes,
> including the & before $f, but the output is the same.
>
> One thing that of note that might be a clue is that not even the table
> heading is showing since I moved the theme('table'... call to a theme
> function. I just get the upper standard part of the form, all the fields
> rendered as if the theming and drupal_render were being ignore
> altogether (stacked vertically), and then the submit button.
>
> On 09/03/2010 03:59 PM, John Fiala wrote:
>> Hm. I'm wondering if $elements['table'] actually exists. Try
>> http://pastebin.com/xU4F7C0m - pay attention to lines 51 through 58,
>> that's where I made changes.
>>
>> Basically, I think the problem is that the $elements item _is_ the
>> 'table' level, and that's why you're not finding your rows. And it's
>> important to use $elements[$k] instead of $f, because drupal_render's
>> changes need to go back to the calling function.
>
>
> ------------------------------
>
> Message: 4
> Date: Sat, 4 Sep 2010 17:03:15 +0530
> From: "sivaji j.g" <sivaji2009 at gmail.com>
> Subject: Re: [development] [support] Administer a subset of users
> To: development at drupal.org
> Message-ID:
> <AANLkTimEpXKJOsGNp_aVc5e7fHPZbdCRQSLd7YVryzG_ at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> On Wed, Sep 1, 2010 at 5:02 PM, Earnie Boyd <earnie at users.sourceforge.net>wrote:
>
>> sivaji j.g wrote:
>>
>>> Hi,
>>>
>>> I am developing a smart school site where one of the user roles is
>>> "collage". Users belongs to this role need to be allowed to administer a
>>> subset of users "students" in the site. The subset of users can be the
>>> users in OG group. The group admin need to be allowed to create, edit,
>>> block and delete users in the group context.
>>>
>>>
>>>
>>>
>> http://drupal.org/project/og
>>
>
> OG module will not fit here. I am sorry if it is not explained clearly. What
> i would need is a way to allow some of the site users to create/ mange their
> own sibling user account. I know Drupal core doesn't handles this case and
> there is no contrib module for the same.
>
> A similar requirement is clearly explained here in d.o forum
> http://drupal.org/node/696664
> <forum-snip>
> Our users are customers and they must be added by an administrator. Some
> customers should be enabled to create their own "subcustomers" and of course
> be able to edit and delete them.
> The problem is, that if you want to enable someone to add users, by default,
> there is only the "administer users" permission. They would have been
> enabled to edit all other customers as well with that permission. Of course,
> you could protect your users with the user_protect module or others, but
> then, the "customer admins" would not be able to edit their own subcustomers
> any more.
> </forum-snip>
>
> I posted this here to get core developer attention to see if there are any
> discussions going on to introduce this feature, unfortunately nobody has
> experienced similar requirement or reluctant to share their approach.
>
> The possible best solution recommended to me is to expose a version of the
> registration form to create sibling users. Hope this will help others.
>
>
>
>
>
>
> --
> Sivaji
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: http://lists.drupal.org/pipermail/development/attachments/20100904/1aa72946/attachment-0001.html
>
> ------------------------------
>
> --
> [ Drupal development list | http://lists.drupal.org/ ]
>
> End of development Digest, Vol 93, Issue 8
> ******************************************
More information about the development
mailing list