3
I am developing a plugin for member area in Wordpress and I will control this access through the functions (roles).
Suppose I create the functions: content1, content2 and content3. How I could assign more than one function to a created user?
$website = site_url();
$cliente_userdata = array(
'first_name' => 'Primeiro Nome',
'user_login' => 'E-mail',
'user_email' => 'E-mail',
'user_url' => $website,
'role' => 'conteudo1',
'user_pass' => NULL // Cria Sózinho
);
wp_insert_user( $cliente_userdata ) ;
passing comma separated values will not work.
add_role()
yes.– Ricardo Moraleida
It worked that way, thank you!
– Anderson Costa