I
I
Ivan Petrov2017-07-14 21:26:43
MODX
Ivan Petrov, 2017-07-14 21:26:43

How to check the presence of a user in the database before registration?

Hello. When registering, I have a “sponsor id” field, and if someone registers, he enters there the id of a non-existent sponsor so that the registration does not pass, and if there is a sponsor with such an id, so that the registration succeeds. Sponsor ID I think to store in a custom user field.
How to implement this, the implementation logic in php is clear, but how can this be implemented in modx? Thanks

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Max Beetle, 2017-07-20
@zm_llill

Well, modix is ​​called almost-Framework for that)) that you can write php in it - create a snippet or plugin and drive everything to write in php there. The only thing you should definitely take into account is that you need to work with data through xPDO (or even better just PDO), and not using mysqli as in naked PHP.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question