News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

integrate_activate, email activation

Started by hef, May 06, 2007, 03:14:00 AM

Previous topic - Next topic

hef

Does integrate_activate get called if email activation is not required?

if not, is there a global variable I can check to see if activation is required, so that I can make integrate_register react appropriately?

Orstio

#1
It looks like that hook is invoked only on the action of activation.  There are two instances of it -- one when an administrator is activating an account in the user's profile, and the other in the Member Management panel in the admin panel.

The $regOptions array from Subs-Members.php gets passed to the integrate_register hook.

The value for activation will be $regOptions['register_vars']['is_activated']. 

$regOptions['register_vars']['is_activated'] can have several values:

0 - Account is not yet active
1 - Account is active
3 - Account is awaiting admin approval
5 - Account is active, but user is underage according to COPPA settings


It looks like you are creating a substantial integration.  Can I ask in what you are integrating SMF?

hef

There is a third instance in Register.php in the Activate() function.  I believe this is the one that gets called if a newly registered user clicks the activation link that was emailed to them.

the regOptions['register_vars']['is_activated'] seems to be what I am looking for (I never looked in the register_vars or extra_register_vars array)

I am integrating smf with the realmd server from http://mangosproject.org.  It has a trac page here: hxxp:svn.mangosproject.org/trac/MaNGOS [nonactive]

Orstio

Interesting.  Are you a part of the MaNGOS dev team, or just doing this on your own?  (Just tell me if I'm being too nosy ;) )

Will you be making this integration available as a SMF mod package?

hef

I am just doing this on my own.

Once I have the code working well enough, I am planning on posting it to get some peer review.
its fairly simple code, I figure seeing the code might be useful as a template for another user.

I am planning on releasing the code on the mangosproject forums. If I can work out the package spec, I can release it as a package here, too.

Orstio

Before you release it, please read the SMF license carefully.  I'm not sure if you were planning on distributing any pre-modded SMF files, but it is  definitely worth being informed.

hef

#6
I had no intention of re-releasing smf itself, but eventually as a "Mod" using the same Modifications.xml format that other mods available from this site use.  (I think thats how they do it, I haven't read up on them yet.  I am still working on "making it work" before making it right)
I wouldn't have a problem submitting the mod, once its working, to the smf mod site.

Would there be a problem with me releasing my mod under the gpl (in addition to the license to lewis labs specified in the SMF license)?

Orstio

Sounds good.  :)

You can distribute a mod package under whatever license you wish.  I was concerned about redistribution of modified SMF files, and only because there has been mention of a few cases of it lately.

Advertisement: