[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] sync/inc/class.bo_sync.inc.php, 1.58
From: |
nomail |
Subject: |
[Phpgroupware-cvs] sync/inc/class.bo_sync.inc.php, 1.58 |
Date: |
Tue, 7 Sep 2004 11:45:30 +0200 |
Update of /sync/inc
Modified Files:
Branch:
class.bo_sync.inc.php
date: 2004/09/07 09:45:30; author: mleonhardt; state: Exp; lines: +8 -5
Log Message:
- userswitch bugfix: GetAccountID if Device is already in phpgw_syncdevices
=====================================================================
Index: sync/inc/class.bo_sync.inc.php
diff -u sync/inc/class.bo_sync.inc.php:1.57 sync/inc/class.bo_sync.inc.php:1.58
--- sync/inc/class.bo_sync.inc.php:1.57 Mon Jul 12 19:35:27 2004
+++ sync/inc/class.bo_sync.inc.php Tue Sep 7 09:45:30 2004
@@ -91,13 +91,16 @@
function AuthenticateSyncDevice($URI, $username, $password)
{
$deviceid = $this->so->GetDeviceID($URI);
+
+ $phpgw_accountid = $GLOBALS['phpgw_info']['user']['account_id'];
+
if ($deviceid >= 0)
{ // device is in database, test for username and password
- $ret = $this->so->GetDevice($URI, $username, $password);
+ $ret = $this->so->GetDevice($URI, $username, $password);
if ($ret < 0)
- {
error_log("Error: username/password not correct for device: [$URI],
username: [$username]");
- }
+ else
+ $phpgw_accountid = $this->so->GetAccountID($ret);
}
else
{ // device is not in database
@@ -112,7 +115,7 @@
$ret = -1;
}
}
-
+
// switch user if device is authorized and the user is different from
current one
if (($ret >= 0) and ($phpgw_accountid <>
$GLOBALS['phpgw_info']['user']['account_id']))
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] sync/inc/class.bo_sync.inc.php, 1.58,
nomail <=