diff options
author | friendica <info@friendica.com> | 2013-07-18 21:35:28 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2013-07-18 21:35:28 -0700 |
commit | 94dfe87a6baba5424916a831877f91875a85278d (patch) | |
tree | d2166cffc892d04ff1ecaef3b95b0af5fa33b356 /include | |
parent | 247d132e17a86ae4fe5c10eda23cfd9d7c64dd9e (diff) | |
download | volse-hubzilla-94dfe87a6baba5424916a831877f91875a85278d.tar.gz volse-hubzilla-94dfe87a6baba5424916a831877f91875a85278d.tar.bz2 volse-hubzilla-94dfe87a6baba5424916a831877f91875a85278d.zip |
fix default channel setting after import
Diffstat (limited to 'include')
-rw-r--r-- | include/identity.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/include/identity.php b/include/identity.php index 4bbc8970b..7e42e33a8 100644 --- a/include/identity.php +++ b/include/identity.php @@ -241,11 +241,13 @@ function set_default_login_identity($account_id,$channel_id,$force = true) { $r = q("select account_default_channel from account where account_id = %d limit 1", intval($account_id) ); - if(($r) && (count($r)) && ((! intval($r[0]['account_default_channel'])) || $force)) { - $r = q("update account set account_default_channel = %d where account_id = %d limit 1", - intval($channel_id), - intval($account_id) - ); + if($r) { + if((intval($r[0]['account_default_channel']) == 0) || ($force)) { + $r = q("update account set account_default_channel = %d where account_id = %d limit 1", + intval($channel_id), + intval($account_id) + ); + } } } |