1
jegelstaff
New Module and Hack: 'Registration Codes' -- for pre-assigning group membership to new users

UPDATED to version 1.1!! - September 1 2004

==================

Hello,

I would like to announce a new module that integrates with the user registration system, and allows you to pre-assign group membership to users. You can download it here:

http://www.freeformsolutions.ca/reg_codes_1.1.zip (installation instructions in the readme)

Why would you want to pre-assign group memberships to new users?

Imagine you have a lot of prospective new users that you know are all going to sign up for your site in the near future. Imagine also that you have many different groups of users in your site, not just Registered, Anonymous and Webmasters. That's a common situation if you're using XOOPS for an intranet-style purpose.

With the way XOOPS works by default, you would have to have each user create their own account and then you would have to assign the group memberships for every user account that had been created. If you've got 100, or even a dozen accounts that you need to do this for, it would be either a pain or practically mind-numbing.

Enter 'Registration Codes', the module that can save your day. : )

Suppose you've got a group in your XOOPS site called "New York Volunteers" and you've got 50 volunteers in the New York area that need to create accounts for your fabulous site. With the 'Registration Codes' module you can make a code that is associated with the New York Volunteers group. Then you pass that code on to your 50 volunteers by e-mail, phone, at a training session, or however else works best for you, and then when the volunteers go through the registration process to create their accounts, they just include the registration code you provided and they will automatically be made a member of the New York Volunteers group.

You can associate more than one group with a code. You can specify an expiry date after which a code no longer works, and you can specify a maximum number of uses after which a code no longer works (maybe you set your New York Volunteers code to 50 uses, so after all those people have registered, no one else can come across the code by accident and register and get access to your sensitive data).

You can also delete codes you've created, or if you have module administration rights, you can delete any code made by anyone.

Through the administration screen you can control which groups have permission to create registration codes for which other groups (ie: you probably don't want the Registered User group having the ability to create registration codes that give new users membership in the Webmasters group!).

Big thanks go out to Tom Hill and his Xoopermod for making it really easy to get this module off the ground. : )

You can download 'Registration Codes' here:

http://www.freeformsolutions.ca/reg_codes_1.1.zip (installation instructions in the readme)

(I would like to recommend that the Core Dev Team consider adding some kind of functionality such as this to XOOPS 2.2, if the development timeline allows it. Without robust user management features like this, XOOPS is very difficult to use in a business style setting with many different user groups. The ability to apply permissions changes to multiple groups at once would be a similar improvement that we would like to see.)

================

**About Freeform Solutions**

Freeform Solutions is a not-for-profit IT company based in Toronto, Canada, and dedicated to helping other not-for-profit organizations make effective use of technology. We have extensive experience in web development, and have identified XOOPS as our platform of choice for meeting the web portal and intranet needs of our clients.

2
jegelstaff
Re: New Module and Hack: 'Registration Codes' -- for pre-assigning group membership to new users

I should mention that this module was built on XOOPS 2.0.7. There are two core files that it provides replacement versions for (register.php and registerform.php, both used for processing new user registrations). Those replacement versions are built from the 2.0.7 versions of those files. If you are using a previous version of XOOPS, and it uses different versions of those files from the 2.0.7 ones, then e-mail me (address in the readme) and I can make files that will work with your XOOPS.

--Julian

3
m0nty
Re: New Module and Hack: 'Registration Codes' -- for pre-assigning group membership to new users
  • 2004/8/19 15:22

  • m0nty

  • XOOPS is my life!

  • Posts: 3337

  • Since: 2003/10/24


there is a module similar to this released a while ago.. called registration keys..

but good work on this 1 :)

4
jegelstaff
Re: New Module and Hack: 'Registration Codes' -- for pre-assigning group membership to new users

Well I guess I should have posted asking if there was anything similar before doing dev work. Thanks for the tip, I will check out that other module.

I searched this site and the Sourceforge list of XOOPS modules, and the web for any sign of a similar module and couldn't find any. XOOPS desperately needs a centralized, regularly updated, module list. There's incredible potential for XOOPS outside of the hobby/fansite niche where it seems to be dominating for now. XOOPS could be the killer CMS/Portal system for the small business/not-for-profit sector, but without serious support resources like a comprehensive module list, it will never happen. Someone please tell me that modules.xoops.org is going to fulfill this need?

--Julian

5
LazyBadger
Re: New Module and Hack: 'Registration Codes' -- for pre-assigning group membership to new users

Can't recall, where I found it, but you tried to find regkeys-v1.0.1 module, which i can send to you (27K) or upload, or "regkeys" search give you hints in Downloads sections

BTW - in light of release 2.0.7.1 (where edited by you core files was'n changed, but... who knows about .2,.3) you can create and add diifs for more easier patching modified register* files in future

Just 2 penny

6
tjnemez
Re: New Module and Hack: 'Registration Codes' -- for pre-assigning group membership to new users
  • 2004/8/20 21:18

  • tjnemez

  • Home away from home

  • Posts: 1594

  • Since: 2003/9/21


julian i just downloaded module, however, it is just directories and no files?

7
darapera
Re: New Module and Hack: 'Registration Codes' -- for pre-assigning group membership to new users
  • 2004/8/20 21:43

  • darapera

  • Just popping in

  • Posts: 67

  • Since: 2003/7/22


Wonderful! Thanks. I've got registration keys too but haven't tried it out, but will check both out soon. You are certainly right. I'm trying desperately trying to use XOOPS for commercial application (my small business) and something like this is sorely missing. Although we don't have a payment module yet (soon I hope) this could actually help implement a semi-automatic payment/signup process. Thanks.

8
jegelstaff
Re: New Module and Hack: 'Registration Codes' -- for pre-assigning group membership to new users

Thank you for all the comments!

tjnemez, I'm not sure what's up there. I downloaded the zip file again just now to double check and it contains all the files, with their correct paths. If you're still having trouble with this, click on my username and send me a PM.

RE: XOOPS 2.0.7.1...

Registration Codes is totally compatible with 2.0.7.1, no patches or changes required.

RE: Registration Keys...

I'll make a few comments that might help people see where there are some differences. I do not mean any of these comments in any way to be a dig at the other module or its author, I'm just trying to illuminate where there are some differences. I think having a choice of modules is good for the XOOPS community, especially when the modules offer different approaches which I think these two clearly do, so people will be able to use what suits their system the best.

Also, I haven't installed Reg Keys or used it myself, so I'm only speaking from having read the install instructions and the write up on the download page, and having looked at the downloaded files.

It looks to me that the biggest difference between the two modules, from a sys admin perspective, is that Reg Keys is a tightly integrated system module that makes changes to eight core files in a few different places.

Whereas our Registration Codes module is not a system module, and it makes changes to two core files (/register.php and /include/registerform.php).

So if you want something that doesn't alter your XOOPS installation that much, then ours might be the one to go with. If you want something integrated tightly with the core, Reg Keys is probably better.

It seems that Reg Keys was built originally for 2.0.6RC (according to the readme), and at least one of the files it altered is not actually present in 2.0.7 (/registration.php), so that might complicate upgrading or installing it from scratch in 2.0.7 or higher (though I suspect register.php in 2.0.7 is very similar to registration.php in 2.0.6).

Also, our module has a permission system, with which you can control which groups are allowed to create codes for membership in which other groups (so the webmaster doesn't have to do all the code issuing, you could let people in one of your groups issue codes that allowed new users to have membership in only that same group). I'm not sure if Reg Keys has that feature, but it's not mentioned in the readme.

Thanks for reading! Happy XOOPSING,

--Julian


9
rossi
Re: New Module and Hack: 'Registration Codes' -- for pre-assigning group membership to new users
  • 2004/8/24 13:38

  • rossi

  • Just popping in

  • Posts: 26

  • Since: 2004/3/24


Great work!

Just one question. I haven't tried it yet but do this module allow you to
activate your group code not only when you register but also when editing your
account at yoursite/edituser.php .
Reason: you can create a new group for any purpose and you don't want adding
100 allready registered users personally to the new group but you have them in
your maillist. Just post "Guys whoever want become member of 'Collegians User'
group just edit your account and register with group code BLA57H".

I'm not sure Reg Keys module have this feature but think if any module of this
kind is mean to become a part of the official CORE in future need this future.

Cheers!

10
jegelstaff
Re: New Module and Hack: 'Registration Codes' -- for pre-assigning group membership to new users

Thanks! : )

No, I'm sorry to say that what you described is not something that this module can do (yet - might add it later, but it would probably require more core hacking).

Consider though, that in the situation you describe you would have to select the e-mail addresses of all the people you wanted to send the code to. You could instead just go into the modify group page for the group you wanted to add them to and select all their usernames and add them. It would be the same number of steps.

However if you wanted to add them to multiple groups, then you would have to repeat the process, so a code would simplify things in that case.

--Julian

Login

Who's Online

198 user(s) are online (83 user(s) are browsing Support Forums)


Members: 0


Guests: 198


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Oct 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits