diff options
author | Yorhel <git@yorhel.nl> | 2011-08-23 15:52:09 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2011-08-23 15:52:09 +0200 |
commit | 49a1cb08f10f69f517f261ad9c34304e4979cefb (patch) | |
tree | e71c2e8ffbeca875ad04e6a96a5c4bd16960d765 /lib/VNDB/DB/Users.pm | |
parent | 18c681f059389646d0b48b305ccf5e7622cb47e4 (diff) |
Added email confirmation to registration process
Diffstat (limited to 'lib/VNDB/DB/Users.pm')
-rw-r--r-- | lib/VNDB/DB/Users.pm | 6 |
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}; } |