Revision 582db59d
Added by Assos Assos almost 9 years ago
drupal7/modules/user/user.module | ||
---|---|---|
1911 | 1911 |
// for authenticated users. Authenticated users should see "My account", but |
1912 | 1912 |
// anonymous users should not see it at all. Therefore, invoke |
1913 | 1913 |
// user_translated_menu_link_alter() to conditionally hide the link. |
1914 |
if ($link['link_path'] == 'user' && $link['module'] == 'system') { |
|
1914 |
if ($link['link_path'] == 'user' && isset($link['module']) && $link['module'] == 'system') {
|
|
1915 | 1915 |
$link['options']['alter'] = TRUE; |
1916 | 1916 |
} |
1917 | 1917 |
|
1918 | 1918 |
// Force the Logout link to appear on the top-level of 'user-menu' menu by |
1919 | 1919 |
// default (i.e., unless it has been customized). |
1920 |
if ($link['link_path'] == 'user/logout' && $link['module'] == 'system' && empty($link['customized'])) { |
|
1920 |
if ($link['link_path'] == 'user/logout' && isset($link['module']) && $link['module'] == 'system' && empty($link['customized'])) {
|
|
1921 | 1921 |
$link['plid'] = 0; |
1922 | 1922 |
} |
1923 | 1923 |
} |
... | ... | |
2488 | 2488 |
} |
2489 | 2489 |
|
2490 | 2490 |
/** |
2491 |
* Last batch processing step for cancelling a user account. |
|
2491 |
* Implements callback_batch_operation(). |
|
2492 |
* |
|
2493 |
* Last step for cancelling a user account. |
|
2492 | 2494 |
* |
2493 | 2495 |
* Since batch and session API require a valid user account, the actual |
2494 | 2496 |
* cancellation of a user account needs to happen last. |
... | ... | |
2536 | 2538 |
} |
2537 | 2539 |
|
2538 | 2540 |
/** |
2541 |
* Implements callback_batch_finished(). |
|
2542 |
* |
|
2539 | 2543 |
* Finished batch processing callback for cancelling a user account. |
2540 | 2544 |
* |
2541 | 2545 |
* @see user_cancel() |
... | ... | |
3039 | 3043 |
$role = user_role_load_by_name($role); |
3040 | 3044 |
} |
3041 | 3045 |
|
3046 |
// If this is the administrator role, delete the user_admin_role variable. |
|
3047 |
if ($role->rid == variable_get('user_admin_role')) { |
|
3048 |
variable_del('user_admin_role'); |
|
3049 |
} |
|
3050 |
|
|
3042 | 3051 |
db_delete('role') |
3043 | 3052 |
->condition('rid', $role->rid) |
3044 | 3053 |
->execute(); |
Also available in: Unified diff
Update Drupal core to version 7.40