MyBB Community Forums

Full Version: Registration with code
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all,

I'm a fresh mybb user and about to launch my forum soon, but still have an unanswered question in my head.

I'd like to deanonimize users for admins. My forum will be for closed group of users and I'll have the possibility to meet every user of my forum so I was thinking is there a way to give every single user a code which he must enter while registering?
User would still be able to chose his own username and pass but after that code admins could easliy see who is who.

Is there a easy way to do that on mybb? Or maybe a plugin for that?
the easiest way without a plugin, would be to create a custom profile field from ACP >> Configuration >> Custom Profile Field and make it "Required" for registration... then you can ask your members to enter the code you give to them...

only problem is that, there will be no validation hence a stranger can register by entering any value to that field... but considering that your forum will be for a closed group this should not have much impact....
Thanks for reply, your idea looks promising but might be not enough for 150 accounts (considering one ppl can say to other ppl that forum exists)
Maybe there is a way to generate login and pass for all users, then force them to change it and type mail? But I doubt I'll be able to track that..
(2015-01-04, 05:41 PM)mmadhankumar Wrote: [ -> ]only problem is that, there will be no validation hence a stranger can register by entering any value to that field...

In profile field options you can actually enter a Regular Expression that matches only specific codes and the registration will be blocked if the users enter a wrong code.
(2015-01-05, 05:16 AM)Destroy666 Wrote: [ -> ]In profile field options you can actually enter a Regular Expression that matches only specific codes and the registration will be blocked if the users enter a wrong code.

but here he wants one code per member i believe... 100 members means 100 different codes specific to each member... is that possible with the "Regular Expression" option  Huh
(2015-01-05, 05:46 AM)mmadhankumar Wrote: [ -> ]
(2015-01-05, 05:16 AM)Destroy666 Wrote: [ -> ]In profile field options you can actually enter a Regular Expression that matches only specific codes and the registration will be blocked if the users enter a wrong code.

but here he wants one code per member i believe... 100 members means 100 different codes specific to each member... is that possible with the "Regular Expression" option  Huh

Well, the regex field is TEXT so anything up to over 60000 characters will theoretically work. And you can shorten it to around 10-60 chars by using some kind of a complicated pattern for the codes instead of checking each one by one.

Of course a plugin that would check the input against a db table or file with codes would be better, but since it's required to be coded and OP doesn't seem to have experience with that, this could be used as a solution too.
Yes, I'd like a unique code for each user and I have zero experience with that, so simple solutions are best for me. Two more questions because I see it's doable that way:
1. Do I separate this codes by typing them in ()? eg. (1234)(5678)?
2. How I'll be able to check which user used which code?
1. No. You also need | separator between each capture group and also ^$ for beggining/ending, so something like ^(123xyz|xyz123|zyx321|321zyx)$
2. In their profile.
Looks like it's gonna work, once again thanks for help.