mhogo
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: limit the number of registrationsbcworkz,
Thank you again for your reactivity. I really appreciate your help especially as I am new to this forum.
I will therefore ask the developers of the profile builder plugin directly.
I will come back as soon as I have any information.Thank you.
Forum: Developing with WordPress
In reply to: limit the number of registrationsFirst of all, thank you all for your respective responses. It is really kind of you to give me practical advice. I am new to this site.
what I forgot to specify is that the client’s site includes a member area which allows students to register. they only have a role of subscriber. As for the coaches, they have an editor role where they can modify things, change the schedule for students etc …
So, as I said, I used the profile builder plugin from Cozmoslabs which makes the job a lot easier when creating a member’s area.
The problem that I cannot solve is to be able to limit the students who register for the fitness course to 20 places, to the swimming pool course to 15 places. The ideal would be that when the user clicks on register of profile builder, there is a message like “sorry but the number has been reached. Apparently, a code like this could solve the problem but I don’t know how to do it. and which file I should insert it in. I can’t find the function that triggers the registrations so that I can make a logical condition.
// button
param (login, password, etc …)
$ req = $ bd-> save (param);
$ total_users = $ user-> getTotal (), // Get total number of users in databaseif ($ user_total <20) {
then use the recording function
}
else {
echo “Sorry, the number of authorized users has been reached”
}Once again, here’s th eregistration page link
http://s810913372.onlinehome.fr/register/Thank you