Skip to content

Pass email address for User creation on CAS Authentication #9

@shaneonabike

Description

@shaneonabike

Hey there,

Thanks so much for building this great WP integration with CAS. in our situation, our network WP requires an email address for accounts to be created.

On line 484 of classes/wp_cassfiy_plugin.php you are doing the following:

$wordpress_user_id = WP_Cassify_Utils::wp_cassify_create_wordpress_user( $cas_user_datas[ ‘cas_user_id’ ], null );

The problem is that means that no email address is ever set on account creation even if one is passed by CAS.

I did this hack to make it work, but I’m sure there is a better way to pull it out of the mappings (or another method)

// Pass email address for creation or it fails
$email = (isset($cas_user_datas[’email’])) ? $cas_user_datas[’email’] : NULL;
$wordpress_user_id = WP_Cassify_Utils::wp_cassify_create_wordpress_user( $cas_user_datas[ ‘cas_user_id’ ], $email );

What do you think? Would it be possible to add the ability to pass the email address to the creation function instead of null?

Thanks again!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions