Khalid Ibrahim, 23, was stopped by police in Cardiff who discovered a Nokia phone on which messages linked to the supply of class A drugs were found.