A California Taco Bell manager is getting heat after he allegedly told workers to lock a homeless man in a dumpster.

According to The Record Searchlight, high school student Jacob Cook, 16, said he was in line at the Redding restaurant when he heard manager Darrin Hailey tell employees to lock the man in the dumpster. A worker then closed the lid while the man was sleeping inside, Cook said.

"Josh (the homeless man) was banging there and banging there," Cook told the newspaper.

>> Read more trending stories

The man, identified only as Josh, was stuck in the dumpster for about an hour until the police arrived and removed him, Cook told KRCR-TV.

Hailey denied Cook’s claims, saying the dumpster wasn’t locked but had to be closed per city ordinance.

"The gates can be opened from in or outside," he told The Record Searchlight.

Cook said he and Josh are now friends.