Praise be to Allah, the Lord of the Worlds; and may His blessings and peace be upon our Prophet Muhammad and upon all his Family and Companions.
If someone is currently indebted and does not have enough money to payback the debts, according to Shariah law the creditors can take this person to court, and the judge can place him under guardianship and sell what is in surplus of his needs. But it is not permissible for the judge to sell his property/goods under their real value.
Then the judge would distribute what he received from the sale to the creditors according to the sales, except the one who finds his very effects (property) then he has the more right to take it back. The evidence about this is the Hadith reported by al Daru Qutni and which al- Hakim classified as authentic, that Muadh Ibn Jabal, may Allah be pleased with him, narrated that "the Prophet (Sallallahu Alaihi wa Sallam) placed him under his guardianship and sold his wealth, as he was indebted, and distributed the money obtained from the sale among his creditors. So he gave them back five out of seven of their rights, and the Prophet (Sallallahu Alaihi wa Sallam) told them that was all they could get. After that the Prophet (Sallallahu Alaihi wa Sallam) sent him to
Moreover, Al-Bukhari and Muslim reported that Abu Hurairah, may Allah be pleased with him, narrated that Prophet (Sallallahu Alaihi wa Sallam) said: "If a man goes bankrupt, and any of his creditors finds his own property (the same property he gave as a loan) with him, he is more entitled to take it back (than other creditors). The wordings are Muslim's.
After the creditors obtain their share, the debts that remain therein has still to be paid, and these remains as debts until the debtor pays them back, as clearly expressed in the previous Hadith narrated by Muadh. However, the creditors should grant time for the debtor until it becomes easy for him to repay. Allah says: "And if the creditor is in hard time (has no money) then grant him time till it is easy for him to repay"[2:280]
And it is better for the creditors to remit the debt if the debtor has no money to pay back. Allah says: "But if you remit it by way of charity that is better for you, if you did but know"[2:280]
Therefore, it becomes evident that even if the law rules that a specific person is bankrupt and releases him from any obligation, he still has to pay back the right of others. But if he has no money to pay back his debts, then one should give him time until it becomes easy for him to pay, as Allah does not burden a soul more than it could bear, and because of the verse mentioned previously. However, if the government takes the responsibility of paying back the rights of the creditors, and pays the debts, then the debt is considered as having been paid back. May Allah enable us and you to do good, and help us.
Allah knows best.