summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Barth2010-09-18 00:36:58 +0000
committerAlex Barth2010-09-18 00:36:58 +0000
commitb9e88b56e0b9977c887fb415fd10948b21a120b1 (patch)
tree460c3f27c47ac5de8100d3efe883bdcae71db654
parent1e60af39fd1fd0d20b3227f253a91efce1a1e450 (diff)
Convert user_load().
-rw-r--r--plugins/FeedsNodeProcessor.inc4
-rw-r--r--tests/feeds_mapper_profile.test4
2 files changed, 4 insertions, 4 deletions
diff --git a/plugins/FeedsNodeProcessor.inc b/plugins/FeedsNodeProcessor.inc
index 9dfae9e..107652f 100644
--- a/plugins/FeedsNodeProcessor.inc
+++ b/plugins/FeedsNodeProcessor.inc
@@ -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 {
diff --git a/tests/feeds_mapper_profile.test b/tests/feeds_mapper_profile.test
index 833820c..3bc3879 100644
--- a/tests/feeds_mapper_profile.test
+++ b/tests/feeds_mapper_profile.test
@@ -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');
}