mmalk
Forum Replies Created
-
i do it put he can insert number and text for me i want only number not accepte any text.
@missveronicatv thank you to help me.
i want only number can told me how ?
@missveronicatv thank you πΉ
this mean only the are one way to see βShow User Registration data in the backend is explainedβ from [info] conβt see inside when push [edit] becose some time need to edit like wrong somthing .
@missveronicatv what i mean:
when go inside (wp-admin) and go to (users) all users come in this page i de Edite for one user i want see him information he not give me all what ask him in the register form like (nationalite and day birth and old school etc β¦ )
all this he write in register fome.
i wish you under stand me.
thank you
- This reply was modified 3 years, 2 months ago by mmalk.
thank you @missveronicatv this is for admin columns i need when do Eidt profile in wp admin

@missveronicatv first i want realy thank you for help me now all is ok with me πΉ .
only one point i wish to know how do it:
aftr i add some information when he register like date birth and nationalite and more more information how show all this in β wp-admin > users β ?
from wordpress settieng: New User Default Role is ” Subscriber “
i add the new Role from UM
@missveronicatv thank you
now is working put he put in 2 role like : (Subscriber and Kd 3) or (Subscriber and Kd 4)
thank you @missveronicatv put not work
the “um_kd-3” is the name of role
add_action( 'um_registration_complete', 'um_registration_complete_set_new_role', 2, 2 ); function um_registration_complete_set_new_role( $user_id, $args ) { $birth_date = um_user( 'birth_date' ); if ( ! empty( $birth_date )) { $from = new DateTime( $birth_date ); $to = new DateTime( 'today' ); $years = (int)$from->diff( $to )->y; if ( $years > 18 ) { UM()->roles()->set_role( $user_id, 'um_kd-3' ); } else { UM()->roles()->set_role( $user_id, 'um_kd-4' ); } } }@missveronicatv if you can see what i do if have email to send for you
thank you @missveronicatv .
i will told you what i want.
i work for school and he ask me to let the student put the birth date like βdd/mm/yyyyβ and the system do age calculation “X years” if the student:
X years put him is class A , if he Y years put him in class B , etc.
i puy the class like roles the are many roles i will be do.
can i do it like that or no!