Hammad said: Ibrahim said: "The ruler (imam); if they differ over it, then the guardian (wali), then the husband."