limit the number of registrations
-
Here is my problem. I work for a client who has a sports site. 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 …
, 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.
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”
}here’s the registration page link
http://s810913372.onlinehome.fr/register/Thank you.
The page I need help with: [log in to see the link]
- The topic ‘limit the number of registrations’ is closed to new replies.