function _drupagram_account_list_row in Drupagram 7
Same name and namespace in other branches
- 6 drupagram.pages.inc \_drupagram_account_list_row()
1 call to _drupagram_account_list_row()
- drupagram_account_list_form in ./
drupagram.pages.inc - Account List form builder.
File
- ./
drupagram.pages.inc, line 91 - Drupagram admin page callaback functions.
Code
function _drupagram_account_list_row($account) {
$form['#account'] = $account;
$form['id'] = array(
'#type' => 'value',
'#value' => $account->id,
);
$form['uid'] = array(
'#type' => 'value',
'#value' => $account->uid,
);
$form['username'] = array(
'#type' => 'value',
'#value' => $account->username,
);
$form['image'] = array(
'#markup' => theme('image', array(
'path' => $account->profile_picture,
)),
);
$form['visible_name'] = array(
'#markup' => l($account->username, 'http://instagram.com/' . $account->username, array(
'attributes' => array(
'target' => '_blank',
),
)),
);
$form['description'] = array(
'#markup' => filter_xss($account->bio),
);
// Here we use user_access('import own media') to check permission
// instead of user_access('import own media', $account->uid)
// because we allow roles with sufficient permission to overwrite
// the user's import settings.
if (variable_get('drupagram_import', TRUE) && user_access('import own media')) {
$form['import'] = array(
'#type' => 'checkbox',
'#default_value' => user_access('import own media') ? $account->import : '',
);
}
$form['delete'] = array(
'#type' => 'checkbox',
);
return $form;
}