Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
feeds
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
drupal.org
feeds
Commits
b9e88b56
Commit
b9e88b56
authored
14 years ago
by
Alex Barth
Browse files
Options
Downloads
Patches
Plain Diff
Convert user_load().
parent
1e60af39
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
plugins/FeedsNodeProcessor.inc
+2
-2
2 additions, 2 deletions
plugins/FeedsNodeProcessor.inc
tests/feeds_mapper_profile.test
+2
-2
2 additions, 2 deletions
tests/feeds_mapper_profile.test
with
4 additions
and
4 deletions
plugins/FeedsNodeProcessor.inc
+
2
−
2
View file @
b9e88b56
...
...
@@ -185,7 +185,7 @@ class FeedsNodeProcessor extends FeedsProcessor {
'#options'
=>
$format_options
,
'#default_value'
=>
$this
->
config
[
'input_format'
],
);
$author
=
user_load
(
array
(
'uid'
=>
$this
->
config
[
'author'
])
)
;
$author
=
user_load
(
$this
->
config
[
'author'
]);
$form
[
'author'
]
=
array
(
'#type'
=>
'textfield'
,
'#title'
=>
t
(
'Author'
),
...
...
@@ -219,7 +219,7 @@ class FeedsNodeProcessor extends FeedsProcessor {
* Override parent::configFormValidate().
*/
public
function
configFormValidate
(
&
$values
)
{
if
(
$author
=
user_load
(
array
(
'name'
=>
$values
[
'author'
]))
)
{
if
(
$author
=
user_load
_by_name
(
$values
[
'author'
]))
{
$values
[
'author'
]
=
$author
->
uid
;
}
else
{
...
...
This diff is collapsed.
Click to expand it.
tests/feeds_mapper_profile.test
+
2
−
2
View file @
b9e88b56
...
...
@@ -107,11 +107,11 @@ class FeedsMapperProfileTestCase extends FeedsMapperTestCase {
$this
->
assertText
(
'magna'
);
$this
->
assertText
(
'rhoncus'
);
$account
=
user_load
(
array
(
'name'
=>
'magna'
)
)
;
$account
=
user_load
_by_name
(
'magna'
);
$this
->
assertEqual
(
$account
->
profile_textfield_test
,
'red'
,
'User profile_textfield_test is correct'
);
$this
->
assertEqual
(
$account
->
profile_select_test
,
'alpha'
,
'User profile_select_test is correct'
);
$account
=
user_load
(
array
(
'name'
=>
'rhoncus'
)
)
;
$account
=
user_load
_by_name
(
'rhoncus'
);
$this
->
assertEqual
(
$account
->
profile_textfield_test
,
'blue'
,
'User profile_textfield_test is correct'
);
$this
->
assertEqual
(
$account
->
profile_select_test
,
'beta'
,
'User profile_select_test is correct'
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment