Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have created front-end login form that allows users to login from front-end. However, when trying to access Admin section (dashboard), WP's default login form is displayed and user authorization is required.

$user_arr = array( 'user_login' => $u_name, 'user_password' => $u_pass, 'remember' => $u_remember );
$sign_user_on = wp_signon( $user_arr, true );

Any idea?

share|improve this question

1 Answer 1

up vote 0 down vote accepted

OK, I've got it! According to wp codex, second parameter of wp_signon() function refers to whether to use auth cookie or not. So if you use

wp_signon( $user_arr, false );

...re-auth will not be required.

share|improve this answer
    
If that fixes the problem, mark your own answer as accepted to close out the question. –  userabuser Oct 5 '12 at 5:39
    
I would but 1 day time frame is required. –  Dameer Oct 5 '12 at 6:14

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.