Sesed has given a very good reply about the rights of workers on fixed termcontracts.
In the case of your friend, it sounds like possibly the boss in question has forgotten that the persons contract was for 2 years and has now run out. I dont know how big an organisation is it, could the line manager involved be not aware that the person is not a full time employee. Is the organisation big enough to have a HR department ?
Once your friend gets paid to show up for work, my understanding is that a lot of the basic rights of employment apply.
If the situation was not clarified, I do not know if he/she would qualify for a redundancy payment, if laid off.
Either way,it is best to say something, and get the situation sorted.
If the line manager is unaware of the situation, but wants the employee to stay, they could be influential in getting the contract renewed.