Unnecesary direct access to user setting superseded by calls to user_* functions.
[fa-stable.git] / admin / db / fiscalyears_db.inc
index 0d9a9d21646f463349790225860b1c1649f99004..459d16209c044950c2e6580d243869bd82432ed7 100644 (file)
@@ -212,7 +212,7 @@ function delete_this_fiscalyear($selected_id)
 {
        global $db_connections;
        
-       db_backup($db_connections[$_SESSION["wa_current_user"]->company], 'Security backup before Fiscal Year Removal');
+       db_backup($db_connections[user_company()], 'Security backup before Fiscal Year Removal');
        begin_transaction();
        $ref = _("Open Balance");
        $myrow = get_fiscalyear($selected_id);