In all applications under this chapter, any person making affidavit that he is interested against the same and giving security for the costs, if he fails to defeat such application, must, at any time before such application is granted, be permitted to make himself a party and to contest the application.
Ala. Code § 18-2-11 (1975)