user_login_submit
modules/user/user.module, строка 1382
- Версии
- 5
user_login_submit(
$form_id,$form_values)- 6
user_login_submit($form, &$form_state)
Submit handler for the login form. Redirects the user to a page.
The user is redirected to the My Account page. Setting the destination in the query string (as done by the user login block) overrides the redirect.
Код
<?php
function user_login_submit($form, &$form_state) {
global $user;
if ($user->uid) {
$form_state['redirect'] = 'user/'. $user->uid;
return;
}
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии