[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb: [534] trunk/LedgerSMB/User.pm
- Subject: SF.net SVN: ledger-smb: [534] trunk/LedgerSMB/User.pm
- From: ..hidden..
- Date: Sun, 12 Nov 2006 13:03:01 -0800
Revision: 534
http://svn.sourceforge.net/ledger-smb/?rev=534&view=rev
Author: tetragon
Date: 2006-11-12 13:02:59 -0800 (Sun, 12 Nov 2006)
Log Message:
-----------
Fix for saving user preferences
Modified Paths:
--------------
trunk/LedgerSMB/User.pm
Modified: trunk/LedgerSMB/User.pm
===================================================================
--- trunk/LedgerSMB/User.pm 2006-11-12 20:46:26 UTC (rev 533)
+++ trunk/LedgerSMB/User.pm 2006-11-12 21:02:59 UTC (rev 534)
@@ -713,15 +713,14 @@
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(?);");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.