Unnecesary direct access to user setting superseded by calls to user_* functions.
[fa-stable.git] / admin / backups.php
index 63f15a018f5370eab48fdabd9458ee4c1f5e12d0..2831c131747a115e4a6917a87f5a6481c3f98cf0 100644 (file)
@@ -125,8 +125,7 @@ function download_file($filename)
     return true;
 }
 
-$db_name = $_SESSION["wa_current_user"]->company;
-$conn = $db_connections[$db_name];
+$conn = $db_connections[user_company()];
 $backup_name = clean_file_name(get_post('backups'));
 $backup_path = BACKUP_PATH . $backup_name;