summaryrefslogtreecommitdiff
path: root/lib/VNDB/DB/Users.pm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2011-08-23 15:52:09 +0200
committerYorhel <git@yorhel.nl>2011-08-23 15:52:09 +0200
commit49a1cb08f10f69f517f261ad9c34304e4979cefb (patch)
treee71c2e8ffbeca875ad04e6a96a5c4bd16960d765 /lib/VNDB/DB/Users.pm
parent18c681f059389646d0b48b305ccf5e7622cb47e4 (diff)
Added email confirmation to registration process
Diffstat (limited to 'lib/VNDB/DB/Users.pm')
-rw-r--r--lib/VNDB/DB/Users.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/VNDB/DB/Users.pm b/lib/VNDB/DB/Users.pm
index abea9bec..88de4d96 100644
--- a/lib/VNDB/DB/Users.pm
+++ b/lib/VNDB/DB/Users.pm
@@ -118,7 +118,7 @@ sub dbUserEdit {
my %h;
defined $o{$_} && ($h{$_.' = ?'} = $o{$_})
- for (qw| username mail perm salt ign_votes |);
+ for (qw| username mail perm salt ign_votes email_confirmed |);
$h{'passwd = decode(?, \'hex\')'} = $o{passwd}
if defined $o{passwd};
@@ -134,8 +134,8 @@ sub dbUserEdit {
# username, pass(ecrypted), salt, mail, [ip]
sub dbUserAdd {
my($s, @o) = @_;
- $s->dbExec(q|INSERT INTO users (username, passwd, salt, mail, ip) VALUES(?, decode(?, 'hex'), ?, ?, ?)|,
- @o[0..3], $o[4]||$s->reqIP);
+ $s->dbRow(q|INSERT INTO users (username, passwd, salt, mail, ip) VALUES(?, decode(?, 'hex'), ?, ?, ?) RETURNING id|,
+ @o[0..3], $o[4]||$s->reqIP)->{id};
}