Révision c304a780
Ajouté par Assos Assos il y a environ 6 ans
drupal7/sites/all/modules/ctools/plugins/arguments/user_edit.inc | ||
---|---|---|
2 | 2 |
|
3 | 3 |
/** |
4 | 4 |
* @file |
5 |
* |
|
6 |
* Plugin to provide an argument handler for a Taxonomy term |
|
5 |
* Plugin to provide an argument handler for a Taxonomy term. |
|
7 | 6 |
*/ |
8 | 7 |
|
9 | 8 |
/** |
... | ... | |
12 | 11 |
*/ |
13 | 12 |
$plugin = array( |
14 | 13 |
'title' => t("User edit form: User ID"), |
15 |
// keyword to use for %substitution
|
|
14 |
// Keyword to use for %substitution.
|
|
16 | 15 |
'keyword' => 'user', |
17 | 16 |
'description' => t('Creates a user edit form context from a user ID argument.'), |
18 | 17 |
'context' => 'ctools_user_edit_context', |
... | ... | |
30 | 29 |
if ($empty) { |
31 | 30 |
return ctools_context_create_empty('user_edit_form'); |
32 | 31 |
} |
33 |
if(is_object($arg)){
|
|
32 |
if (is_object($arg)) {
|
|
34 | 33 |
return ctools_context_create('user_edit_form', $arg); |
35 | 34 |
} |
36 | 35 |
if (!is_numeric($arg)) { |
37 | 36 |
return FALSE; |
38 | 37 |
} |
39 | 38 |
|
40 |
$account= user_load($arg); |
|
39 |
$account = user_load($arg);
|
|
41 | 40 |
if (!$account) { |
42 | 41 |
return NULL; |
43 | 42 |
} |
44 | 43 |
|
45 | 44 |
// This will perform a node_access check, so we don't have to. |
46 | 45 |
return ctools_context_create('user_edit_form', $account); |
47 |
} |
|
46 |
} |
Formats disponibles : Unified diff
Weekly update of contrib modules