I have a custom attribute called rms_id. It's a unique account number that's associated with our customers in another database. I need a way to lookup the customer by this id, without hitting the database manually.
As of now, I can load the customer by email address like so:
$customer->loadByEmail($data['email']);
This is great, however the email is not always available. The RMS id is. Is there any way to load a user by the custom attribute?
In theory, the following would work:
$customer->loadByRmsId($data['account_id']);
However it errors out. Any help would be much appreciated.