Professor refusing to write recommendation letter to make student work longer My friend is on his way to graduate with PharmD (outside US). He wants to apply for PhD program in US, and have asked his professors that he has worked with in the lab for recommendation letters. However, his professors refused to write him a recommendation letter unless he stays in the lab for 1 more year after graduation to work with the current on-going project (2 of them refused, another one has written him a recommendation letter). 

The professor also belittled him when he asked for the recommendation letter, saying things along the line of 


  Am I, or this university not good enough for you? You must be pompous
  for wanting to go to another university.


That particular professor has also shared the rumor in the department that he thinks he is too good to be part of this university. In the past, they have offered him PhD program with scholarship, but have later retracted the scholarship so he rejected the offer to stay with them. He needs the recommendation letter to apply for PhD program.

What can he do when professors refuse to write recommendation letter for him unless he works with them longer? He definitely do not want to stay in that toxic environment anymore. 

EDIT (12/19): All professors have agreed to write the recommendation letter, as long as my friend writes the draft of the letter himself. He has decided to go with this proposal and wrote three recommendation letters for himself, and gave it to his professors.
Your professor is not obligated to write you a recommendation letter.
You should think about getting a letter from someone who will write a good recommendation for you.
Your professors' attitude is highly unprofessional and needs to be exposed to their academic community. When you're clear, file a complaint through proper channels to the dean/HOD. If possible, keep any record of your conversations/emails with the faculty members. Given the fact that such unprofessional behavior exists in your university (that they will ask you to work for them for 1-2 years after graduation as a condition for a recommendation letter), may be the human resource, dean office etc. themselves are unprofessional. So, tread carefully if you plan to expose their behavior. Maybe do it after you have received your degree etc. However, such behavior needs to be exposed in any academic institution for the sake of future generations.
If your foreign university asks (e.g., in future) why your own advisors didn't write you a recommendation then there is no harm in telling the truth. However, tell only the truth not your version of the truth. It's common for students at a certain phase in their career to panic, act hysterically, and believe that everyone is out to get them.