CGCookie / CGCookie/wp-cassify
Pass email address for User creation on CAS Authentication
- Dominant language
- PHP
- Stars
- 1
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
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)
```php
// 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!
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at line 484 of classes/wp_cassify_plugin.php and inspect WP_Cassify_Utils::wp_cassify_create_wordpress_user, along with the CAS data mapping. Confirm that an email from CAS is used during WordPress user creation when available, while preserving the existing behavior otherwise; verify that accounts can be created when the network requires an email address.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, wordpress
- Domain
- authentication, backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100