News:

Wondering if this will always be free?  See why free is better.

Main Menu

is_activated values

Started by westonm, April 14, 2011, 03:39:31 PM

Previous topic - Next topic

westonm

The members table has a field "is_activated"  What are the valid values and their meaning.  I have found value in code for 1,2,3,4,5,10,11,13,14,15 and 0 but don't know what any of them mean, other than 10 appears to be banned.   I have not found this in any of the documentation. 

Arantor

There is no documentation.

What I can tell you is this:

0 - pending activation
1 - active
2 - I think this is for members who were active and changed their email
3 - never encountered this
4 - pending deletion
5 - pending COPPA form completion

Add 10 if the user is banned.
Holder of controversial views, all of which my own.


westonm

OK - I am creating an external registration process that will update SMF members table.  So it looks like I can set value to 1 and that is really all I need.  Any other changes would be handled by SMF if and when they occured. 

Arantor

Or, you could save yourself some hassle and have SMF handle the registration; Register.php creates an array called $regOptions, which is passed to a function, registerMember() (which is in Subs-Members.php if I remember right), which will handle registration for you...
Holder of controversial views, all of which my own.


westonm

I don't mind the hassle, and it really is not too bad to do what I am doing.  There are several reasons for doing it this way.  Our site is an alumni group, and the information we get on the registration is a lot more detailed than is collected by SMF.  For what we are doing it is easier for the users to go through our registration and pass the info to SMF. 
Thanks for the idea, but I think I will be sticking with the original plan. 

Arantor

I don't think you understand me.

The registerMember() function is not a user-side function. You can call it from your own code, you just give it an array of details. No messing with the DB required, that way if the schema changes for any reason, odds are the code will be more portable.
Holder of controversial views, all of which my own.


CodeDev

Hi!

I found this topic very useful, however I have a question and maybe someone can help me sorting it out...

I have a member banned by partial ban (cannot post messages) and I set it to expire in 60 days.

So far, so good. However, in the smf_members table, I still have "is_activated = 1". So, my question is, it wasn't supposed for this value to be 10 or more?

I'm using SMF 1.1.16.

Thank you very much in advance.


Arantor

No, partial ban is not done with is_activated, only full bans are.
Holder of controversial views, all of which my own.


CodeDev

Oh, I see... Thank you very much!

Dromo

In smfapi_registerMember(), is_activated is set to 3 if $regOptions['require'] contains something other than 'nothing' or 'activation'.

Arantor

Yes, state 3 is admin activation. At the time I compiled the list nearly 4 years ago I didn't know the answer.
Holder of controversial views, all of which my own.


Advertisement: