Umar Khalid granted bail to attend marriage