In PHPmaker 2020, On the registration page the user can select the user level. (id_level), but it doesn’t appear on the page and use the default level (0) when registration endsIn the database table there are these fields: id, user, password, select, id_level.Is it possible to take the user (id) in the User Registered event function?
to use this (id) and use it to change the (id_level) depending on what you have selected (select).thanks.
Only administrators can manage user levels. The user level field will not appear in registration page or the Edit page of the user table.
josecnp1 wrote:
Is it possible to take the user (id) in the User Registered event function?Yes, it is. You may simply use this code to display the value from “id” field of your “users” table in “User_Registered” server event:$this->setMessage("ID is: " . $rs[“id”]);If you want to update the value in “id_level” then you may simply use Execute() global function.
Please read “Some Global Functions” under “Server Events and Client Scripts” topic from PHPMaker Help menu for more info and example.