Each employee's contract with their employer is entirely separate to that of other employees (unless there are fixed pay scales in place, as in some public services, or where a union has negotiated common pay rates).
As long as an employer doesn't discriminate based upon factors such as gender, race or sexuality (or between part-time and full-time workers) it's perfectly lawful for him to pay staff doing the same job at different rates.
Indeed, in the banking industry you might find two people sitting at adjacent desks, doing exactly the same job,with one employee (who hasn't moved companies since he started work) paid £30,000 pa and the other (who has been actively 'head-hunted' on several occasions) paid £300,000 pa.