This repository was archived by the owner on Oct 29, 2020. It is now read-only.
Refactor get user field#2638
Merged
angaither merged 6 commits intoDoSomethingArchive:devfrom Jun 23, 2014
angaither:refactor-get-user-field
Merged
Refactor get user field#2638angaither merged 6 commits intoDoSomethingArchive:devfrom angaither:refactor-get-user-field
angaither merged 6 commits intoDoSomethingArchive:devfrom
angaither:refactor-get-user-field
Conversation
Contributor
There was a problem hiding this comment.
Minor but I could see us moving this into dosomething_helpers to potentially use in other modules.
Contributor
|
Code looks ok - just seemed to find the one bug in the Campaign Close template. Another place we could use this is in the User Signup Form, where we collect addresses, but this is also minor and not needed for merge.. |
Contributor
|
👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Refactoring calls to
dosomething_user_get_fieldWhat does this PR do?
dosomething_user_get_fieldfunctionHow to test
drush php-evalfunctions to make sure the results are as expected, a few to test...drush php-eval "var_dump(dosomething_signup_get_mbp_params(user_load(10), node_load(84)));"drush php-eval "echo dosomething_user_is_under_thirteen(user_load(10))"drush php-eval "echo dosomething_user_get_field('field_first_name', user_load(10), 'ucwords');"Bonus! Fixes #2606