Version 1.0.1 Fixed Missing Columns
I just committed a new version of Church Member. This fixes the issue of the added ‘active’ column to the database. If you upgraded or installed the 1.0-stable version, then you will need to update some pages and your sql database in order that your registered members will show up in the directory and on the admin page. I added the active column so that the admin can set a members’ profile to inactive if the member switches his/her membership to another church.
However, when I added this ‘active’ column, the feature was incomplete because it wasn’t updated for sql initial installs nor was it updated in the registration process. For those of you who have installed the 1.0-stable version, below are the steps you need to take in order to correct this issue. Furthermore, these fixes have been added to the demo version as well which would have kept people from logging in once they registered.
There is a date joined column that was added that will appear on the edit profile and admin pages. Run this sql command:
ALTER TABLE members ADD djoined date AFTER member;
This will update your members table by adding the ‘active’ column if it is missing. Run this sql command:
ALTER TABLE members ADD active tinyint(1) AFTER password;
Now, you will need to update the rows of all members for that new column by running this command:
UPDATE members SET active = 1;
After running the sql commands above, you will need to edit your register.php page, so that when users register, they will be set to active. Change line 63, from this:
mysql_query("INSERT INTO `members` (username,first_name,last_name,level,password,email,date) VALUES ('$username', '$first_name', '$last_name', '2', '$password', '$email', NOW())") or die (mysql_error()); //Inserts the user.
to this:
mysql_query("INSERT INTO `members` (username,first_name,last_name,level,password,email,active,date) VALUES ('$username', '$first_name', '$last_name', '2', '$password', '$email', '1', NOW())") or die (mysql_error()); //Inserts the user.


Recent Comments