First-time login crash with PostgreSQL
 
This is caused by the use of a reserved word in main.inc on line 389:
 
    $DB->query("INSERT INTO ".get_table_name('identities')."
                (user_id, `default`, name, email)
                VALUES (?, '1', ?, ?)",
                $user_id,
                $user_name,
                $user_email);
 
The fix for postgres:
 
    $DB->query("INSERT INTO ".get_table_name('identities')."
                (user_id, \"default\", name, email)
                VALUES (?, '1', ?, ?)",
                $user_id,
                $user_name,
                $user_email);
It might be that this one was missed in the move to support postgres.
 
Since the creation of the default identity now succeeds, the first login for each user succeeds. This issue only appears for new users in an existing installation using postgres and all users in a new installation.
 
In regards to identity creation, should there be a way to configure the user's default email address? See the following scenario:
imap: imap.cs.ucr.edu
user: user
DOMAIN: cs.ucr.edu
 
generated email:
user@imap.cs.ucr.edu
 
opposed to:
user@cs.ucr.edu
 
Conley Read
cread@cs.ucr.edu
http://www.conleyread.net/