i want to use codeignider login form session in wp login form

public function check_login()

    //Set Page Title
    $data['title'] = "Check Login"; 

     $username = $this->input->post('username');
     $email = $this->input->post('username');
     $password = $this->input->post('password');        
     $password = hash('sha1',$password);
    echo (int)$is_admin = $this->loginmodel->user_login($username, $email, $password);
    // print_r($is_admin);
  • So you have codeignider (CI) and wordpress (WP), and you want the CI to generate the form, and WP to check the authentication? – Puggan Se Aug 14 '13 at 5:03
  • yes,please help me, in my website all task perform by ci but only blog are integreted by wordpress.for the login purpose of the user which used the blog part will only login through the ci but they will also permission use the blog like comment or reply after logging the ci login – virendra Aug 14 '13 at 5:08
  • takethisjoborshoveit.com/login this is ci login takethisjoborshoveit.com/blog/?p=96&user_id= wordpress – virendra Aug 14 '13 at 5:16

To use Wordpress as Authenticator, you can use the function wp_signon(). So take the post-data from the codeignider and send it to wp_signon()

| improve this answer | |
  • thanx for helping me but i am new to wordpress and codeignider may you explain in detail plz......... – virendra Aug 14 '13 at 5:31
  • check the exemple on the linked page, and change the row to look like $creds['user_login'] = $this->input->post('username'); – Puggan Se Aug 14 '13 at 5:34
  • great it working but when i login through ci why i need login again for comment in wordpress takethisjoborshoveit.com/blog/?p=96&user_id= You must be logged in to post a comment. – virendra Aug 14 '13 at 5:46
  • if user are register in both table like tbl_user for ci and wp_users for wordpress. if login through ci,it means they have permission for access entire blog like comment – virendra Aug 14 '13 at 5:50
  • if you need code of ci tell me plz – virendra Aug 14 '13 at 5:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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