summaryrefslogtreecommitdiff
path: root/LedgerSMB
diff options
context:
space:
mode:
authortetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46>2006-11-12 21:02:59 +0000
committertetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46>2006-11-12 21:02:59 +0000
commitd6ef130326334ee98669b4968893c1924dafcbbf (patch)
tree478d916849498f1a39ad6f93e4cd8d771a96d761 /LedgerSMB
parent38fffe1d05d95b827a3a357e3ab233b31fa1bd0f (diff)
Fix for saving user preferences
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@534 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'LedgerSMB')
-rwxr-xr-xLedgerSMB/User.pm7
1 files changed, 3 insertions, 4 deletions
diff --git a/LedgerSMB/User.pm b/LedgerSMB/User.pm
index a020affb..95f3fc4f 100755
--- a/LedgerSMB/User.pm
+++ b/LedgerSMB/User.pm
@@ -713,15 +713,14 @@ sub save_member {
my $userCheck = $dbh->prepare("SELECT id FROM users WHERE username = ?");
$userCheck->execute($self->{login});
my ($userID) = $userCheck->fetchrow_array;
+ my $userConfExists = 0;
if($userID){
#got an id, check to see if it's in the users_conf table
- my $userConfCheck = $dbh->prepare("SELECT id FROM users_conf WHERE id = ?");
+ my $userConfCheck = $dbh->prepare("SELECT count(*) FROM users_conf WHERE id = ?");
$userConfCheck->execute($userID);
- if($userConfCheck->rows){
- my $userConfExists = 1;
- }
+ ($userConfExists) = $userConfCheck->fetchrow_array;
}
else{
my $userConfAdd = $dbh->prepare("SELECT create_user(?);");