Hello @gkina
Thank you for reaching out to us, Hope you are doing well.
Please turn on user type from Settings > User > User type > that will bring a radio button to our registration form where the user can pick an option to become a subscriber or author (listing owner). After you enable it, the user will have a button called to become an author on their dashboard. Please make an announcement from your admin to let them know.
Hope this will help and please let us know if you have more queries. We are always here to help you.
Kind Regards,
Sheikh Faysal
-
This reply was modified 3 years, 11 months ago by
skfaysalalom.
-
This reply was modified 3 years, 11 months ago by
skfaysalalom.
Thread Starter
gkina
(@gkina)
Hi Faysal thanks for your answer.
I already know that.
I’d like to read the user’s role to show him different things on the page.
Is it possible?
Hey @gkina,
That would be possible, yes. How we differentiate between the author and the normal user is by storing a meta on the usermeta table indicating the type of user. If you want to do something using code, getting the user type would be something like this:
$user_id = get_current_user_id();
$user_type = get_user_meta( $user_id, '_user_type', true );
if( $user_type == 'general' || $user_type = 'become_author' || $user_type == 'author') {
//do something
}
Here ‘general’ is for users who aren’t an author, ‘become_author’ are the ones who applied to become an author but it isn’t approved yet, and ‘author’ is the ones who are, well, authors. So modify the ‘if’ condition accordingly.
Hope this helps, let me know if there’s anything else.
Regards,
Mahdi.
-
This reply was modified 3 years, 11 months ago by
Mahdee.