Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9005083
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T01:03:22+00:00 2026-06-16T01:03:22+00:00

This is coming from a log in form with email and password as the

  • 0

This is coming from a log in form with email and password as the to fields:

echo form_open('main/login_validation');

echo "<P>Email: </br>";
echo form_input('email',$this->input->post('email'));
echo "</P>";

echo "<P>Password: </br>";
echo form_password('password');
echo "</P>";

echo "<P>";

$img_path = base_url()."imgs/log_in_0.png";

echo '<input type="image" src="'.$img_path.'">';
echo "</P>";

echo form_close();

Goes to the controler for form validation:

$this->load->library('form_validation');

$this->form_validation->set_rules('email', 'Email', 'required|trim|xss_clean|callback_validate_credentials');

$this->form_validation->set_rules('password', 'Password', 'required|trim');

if($this->form_validation->run()){
        $data = array(
            'email' => $this->input->post('email'),
            'is_logged_in' => 1
        );
        $this->session->set_userdata($data);

        $nKey ='members';
        $this->page($nKey);
    } else {
        $nKey ='login';
        $this->page($nKey);
    }

Callback sends it to:

public function validate_credentials(){
    $this->load->model('model_users');

    $salt = $this->model_users->get_salt();

    if($this->model_users->can_log_in($salt)){

        return true;
    }else{

    $this->form_validation->set_message('validate_credentials', 'Incorrect Email/Password.');
    return false;
    }

}

when it calls get_salt() it then loads from the model:

public function get_salt(){

    $this->db->where('email', $this->input->post('email'));


    $query = $this->db->get('users');

    if($query){

        $row = $query->row();

        $salt =  $row->salt;

        return $salt;
    }else{
        echo 'failed salt';

    }

}

this same code word fine two days ago, now it gives a non-object error on:

$salt =  $row->salt;

Won’t load the query right, I echoed from the post array with codeigniter function $this->input->post('email'), and it echoed the correct email.

But when I print_r the query it comes back an empty query object, but the email is in the user db table (in the email field and everything), I have checked, I was using this same account to do tests just a few days ago

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T01:03:23+00:00Added an answer on June 16, 2026 at 1:03 am

    so i was getting the error because i entered the wrong pass word and it did test to see if the user existed.

    code to test if user exist:

    CodeIgniter – Checking to see if a value already exists in the database

    in the accepted answer

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have data in this format coming from a database... BUS 101S Business and
I'm seeing this exception message coming from XslCompiledTransform.Transform(), but after handling the exception the
I have an image byte[] , this byte[] is coming from LDAP [Oracle Open
This is the json coming from the server: { name:channelname, args: [ { username:myusername,
I am coming from c# where this was easy, and possible. I have this
I am coming from Java to Ruby and this -7 mod 3 = 2
Coming from a Java background, this is the way I'm thinking: The server provides
Coming from a Java background, this is the way I'm thinking: The server provides
I have this game where balloons are coming from bottom and player has to
I have a view model coming from the server as json like this {

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.