Users
New Database
Intro
Users in the new database (wh2o mysql database) have been greatly simplified.
Terms
- Etap - Etapesty, our member database software
- users - people that registered a website account
- members - people that are AW members
- contact - public information on a user that is exposed to the world and maintained by the user. It is a “public profile” if you will.
- user - user table on the website
- members - member table on the website
- contacts - a table of public information incorporating both our users and non-user public officials
Dataflow
Etapestry (etap) keeps our member database. There is a nightly (usually 1am) data synchronization operation that copies all member records to the website (to the members table). On import we update ~2,000 already registered website users. This update will update all member fields (address, member number, phone number, …). This ensures that changes made by the membership coordinator get transferred to the website. After the update the members table never gets updated until the next dump.
When a user changes their address the change gets recorded in the user table and updated in etap by a web service. This ensures that etap is always the definitive up-to-date source for member information. This also means that the user table is the most up-to-date webside table. The gap occurs when eTap is updated during the day before synchronization. This gap affects the website in the following ways:
- email lists and member database only reflect changes from etap as of 1 am the following morning and changes made on the website
- member database generation only reflect changes from etap as of 1 am the following morning and changes made on the website
- what a user sees as their current address is current as of 1 am the following morning and changes made on the website
There are a couple exceptions. If a user registers on the website after the 1am synch and we have them on file in eTap we will pull eTap's record and put it into the user table as they register.
Finally, the contacts table gets updated under the following circumstances but is NEVER touched by the etap updates:
- a user changes their public contact information
- a user changes their AW address and chooses the option to update their contact information as well
The logic that updates the members and users table can be found in a file called 'update_memberlist.php' which takes a piped-in mime-encoded zip file of members in a predefined (etap-defined) pipe-delimited format.
Structure
The tables are as specified:
- members - has a copy of etap's member list
- user - has username, password and all the fields from the member database. This table also contains additional fields
- contacts - has public profile information on people that are connected to our website include our users.
members connects to user by the memnum field on both tables
contacts connects to user by the contactid = UID, but contacts outnumber users by 4:1 and there may be a contact in the contacts table that duplicates an existing user
There is no relation between members and contacts.
Old Database
Users are represented in the database under the following tables:
- USERS - login, password, and email verify date
- useraux - address, zip, official email, etc…
- ebase - membership database information updated once per day
- contacts - public information about a user (note: contactid = UID)
- contactheader - user to group mapping (note groups 'member' 'user' used to denote aw members and website users updated every 5 min)
The program support for the database support is by the file UserInfo.inc and LoginClient.inc.
Membership Status is expressed as follows:
visitor
Unregistered people, never signed up. No user name.
user
Registered on the website, not an AW member.
UnverifiedUser
People who have not verified their email but have signed up.
Current
AW Members in current standing.
Lapsed
Former AW members.
temp
Recently registered AW members.
tempLapsed
People that bought memberships on the site, then never followed up by registering their AW membership on the website.
unknown
Unknown status people.