Tags:
create new tag
view all tags

Question

I need to dispatch users into specific groups automatically when they register. Is there any pluging or patch doing that?

Environment

TWiki version: TWikiRelease04x00x00
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: RedHat Linux 7.5, kernel 2.7.3
Web server: Apache 2.0.52
Perl version: 5.8.1
Client OS: Windows XP Pro SP2
Web Browser: Mozilla Firefox 1.5.0.1
Categories: Authorisation, Missing functionality, Plugins

-- MohamedSghir - 03 Apr 2006

Answer

ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.

I have never seen one. But what you want to do could easily be done by a script on the server that maintains the groups.

-- CrawfordCurrie - 05 Apr 2006

The feature I really want to add is:

As soon as a new user, whose email respects a specific regexp, registers, it's automatically added to his group as shown below.

-- xxxx@group1PLEASENOSPAM.zz -> group1 -- yyyy@group2PLEASENOSPAM.zz -> group2

So, I need to know which script in the server is adding users to groups in order to pick up the required variables and use them to make my feature works.

thanks in advance

-- MohamedSghir - 05 Apr 2006

As far as I recall there is NO script that adds users to groups - its normally done manually.

That being said, in Dakar/TWiki-4.0 the registration code in TWiki::UI::Register.pm has places one could insert call-outs to perform such things at registration time. Look at the subroutine _finish(). (The sad thing about this is that it isn't atomic.)

You could either insert a call somewhere in _finish() or in _newUserFromRemplate().

The other way to do it is to write a custom plugin. There is a call in _finish() to the plugin registration handler. (Sadly it doen't convey all of the data!) If you read the example code in TWiki::Plugins::EmptyPlugin::registrationHandler() you can see what is possible. As I say, not enough information is hadned down for this to make sensible decisions based on the contnets of the registration form. Exmples of this in 'real life; are in the AddDBMPlugin and the FakeBasicAuthRegPlugin. But the best example I can think of, if my memory serves, is actually in the original Cairo code for NatSkinPlugin.

-- AntonAylward - 05 Apr 2006

Has any progress been made on this? It's exactly the sort of thing that I want to do!

Cheers in advance

-- ChrisCauser - 07 Dec 2007

Yes! there has been progress made - I wrote some code for it just last week. I'll post the patch when I get back to work.

-- SvenDowideit - 08 Dec 2007

see AddUserToGroupsOnRegistration for the 4.1.2 patch.

-- SvenDowideit - 10 Dec 2007

Edit | Attach | Watch | Print version | History: r8 < r7 < r6 < r5 < r4 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r8 - 2007-12-10 - SvenDowideit
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.