[eluser]Pert[/eluser]
If that is your actual code, then there is an issue.
Code:
if ($useractivatedgetdatabase = 1)
{
...
}
This code will set $useractivatedgetdatabase always to 1 and returns true (in other words it will always run the code in the following block.
Code:
if ($useractivatedgetdatabase == 1)
{
...
}
This code will check if your variable value equates to 1, so it could be integer (1), float (1.0), string ( '1') etc.
Code:
if ($useractivatedgetdatabase === 1)
{
...
}
Will check if your value is integer 1.
So you have to have double equals signs in IF statement.
I did notice you are doing this
Code:
$passwordgotdatabase=$this->db->query($passwordget,$emailentered);
$passworddecrypted=$this->encrypt->decode($passwordgotdatabase);
<b>$passwordgotdatabase</b> is not actually a value, it's a query object. This is probably what you should do:
Code:
$passwordgotdatabase = $this->db->query($passwordget, $emailentered);
$passworddecrypted = $passwordgotdatabase->num_rows ? $this->encrypt->decode($passwordgotdatabase->first_row()->password) : '';