I managed to find the issue with the user role not being assigned on registration, it appears the user that works as expected has:
a:2:{s:11:”classifieds”;b:1;s:21:”aamrole_532dbbfa34f77″;b:1;} in the yjtaadz1t_capabilities.
The user that does not seem to work properly has:
a:1:{s:11:”classifieds”;b:1;}
Once I copied the working users yjtaadz1t_capabilities over to the newly created user in the database I am now able to access everything properly. How do I make this work so that the new user is assigned the role properly?
Currently I am assigning the users role programatically using:
//update meta data when registration form is submitted
function register_role($user_id, $password="", $meta=array()) {
$userdata = array();
$userdata['ID'] = $user_id;
$userdata['role'] = $_POST['role'];
$userdata['first_name'] = $_POST['first_name'];
$userdata['last_name'] = $_POST['last_name'];
$userdata['address'] = $_POST['address'];
$userdata['city'] = $_POST['city'];
$userdata['province'] = $_POST['province'];
$userdata['country'] = $_POST['country'];
$userdata['postal_code'] = $_POST['postal_code'];
$userdata['phone_number'] = $_POST['phone_number'];
$userdata['cellphone_number'] = $_POST['cellphone_number'];
// allow if a role is selected
if ( $userdata['role'] ){
wp_update_user($userdata);
}
}
I haven’t been able to figure out the trash issue unfortunately 🙁
Fixed trash issue, now just stuck on the registration issue…
Hi camrinp,
AAM does not support multiroles. Looks like in your examples about your user has two roles: Clasifieds and AAM Custom Role.
You have to make sure that only one role is assigned per user during registration.
Regards,
Vasyl