Jump to content

Can't use method return


Xtremer360

Recommended Posts

I'm trying to figure out why I'm getting a Fatal error: Can't use method return value in write context in /home/xtremer/public_html/kowmanager/app/controllers/login.php on line 101 error.

Line 101 is 
[code=php:0]
if (isset($this->session->userdata('failed_logins')))

 

/**
     * Checks to see if the max number of attempts have been exceeded.
     * 
     * @param string $post_username Posted value of a username field.
     * @return boolean TRUE/FALSE Depends on if login attempts have been exceeded or not.
     */
    private function is_max_failed_login_attempts_exceeded($post_username)
    {
        if (isset($this->session->userdata('failed_logins')))
        {
            if ($this->session->userdata('failed_logins') == $this->config->item('failed_login_limit'))
            {
                $this->users_model->lock_out_user($post_username, date('Y-m-d H:i:s', $this->config->item('wait_time')));
                return TRUE;
            }
            $this->session->userdata('failed_logins')++;
            return FALSE;
        }
        else
        {
            $this->session->userdata('failed_logins') == 1;
            return FALSE;
        }
    }

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.