Thanks for the response. SAML authentication is working ok, I can succesfully login and it is pulling attributes from ADFS. I have the admin dashboard setup in simplesaml already. I found where in the code it is failing, but am unable to troubleshoot this-
private function new_user($attrs)
{
if( array_key_exists($this->settings->get_attribute(‘username’),$attrs) )
{
$login = (array_key_exists($this->settings->get_attribute(‘username’),$attrs)) ? $attrs[$this->settings->get_attribute(‘username’)][0] : ‘NULL’;
$email = (array_key_exists($this->settings->get_attribute(’email’),$attrs)) ? $attrs[$this->settings->get_attribute(’email’)][0] : ”;
$first_name = (array_key_exists($this->settings->get_attribute(‘firstname’),$attrs)) ? $attrs[$this->settings->get_attribute(‘firstname’)][0] : ”;
$last_name = (array_key_exists($this->settings->get_attribute(‘lastname’),$attrs)) ? $attrs[$this->settings->get_attribute(‘lastname’)][0] : ”;
$display_name = $first_name . ‘ ‘ . $last_name;
}
else
{
die(‘A username was not provided.’);
}
$role = $this->update_role();
if( $role !== false )
{
$user_opts = array(
‘user_login’ => $login ,
‘user_pass’ => $this->random_password(),
‘user_email’ => $email ,
‘first_name’ => $first_name ,
‘last_name’ => $last_name ,
‘display_name’ => $display_name ,
‘role’ => $role
);
wp_insert_user($user_opts);
$this->simulate_signon($login);
}
else
{
die(‘The website administrator has not given you permission to log in.’);
}
}
Thanks in advance for any help!!