summaryrefslogtreecommitdiff
path: root/actions/register.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlezvous.ca>2008-06-22 10:09:41 -0400
committerEvan Prodromou <evan@controlezvous.ca>2008-06-22 10:09:41 -0400
commit745a145f0dacc0ef04a43157887d322bf37225eb (patch)
tree746dfe035888818360c90b5111a2002b671f6ee3 /actions/register.php
parent676bbebe1a6225d77416a0e3ea57a90b25627ced (diff)
add better debugging
darcs-hash:20080622140941-34904-2a0eda21f6a374a9d26107a4bc627fc6de2a7063.gz
Diffstat (limited to 'actions/register.php')
-rw-r--r--actions/register.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/actions/register.php b/actions/register.php
index 3ed892e7f..2bb4f12f0 100644
--- a/actions/register.php
+++ b/actions/register.php
@@ -99,8 +99,10 @@ class RegisterAction extends Action {
$profile->created = DB_DataObject_Cast::dateTime(); # current time
$id = $profile->insert();
+
if (!$id) {
- return FALSE;
+ common_log_db_error($profile, 'INSERT', __FILE__);
+ return FALSE;
}
$user = new User();
$user->id = $id;
@@ -110,11 +112,14 @@ class RegisterAction extends Action {
$user->uri = common_user_uri($user);
$result = $user->insert();
+
if (!$result) {
+ common_log_db_error($user, 'INSERT', __FILE__);
return FALSE;
}
if ($email) {
+
$confirm = new Confirm_email();
$confirm->code = common_good_rand(16);
$confirm->user_id = $user->id;
@@ -122,6 +127,7 @@ class RegisterAction extends Action {
$result = $confirm->insert();
if (!$result) {
+ common_log_db_error($confirm, 'INSERT', __FILE__);
return FALSE;
}
}