wordpress plugin activation error

Solution:

This is almost certainly caused by $this->get_logged_in_user()[‘id’].

I would suggest checking the value of $this->get_logged_in_user(). You should see an array with a key of id available. If not, there is your problem.

It is better practice to not directly access functions that return arrays in this way, you may be better with the following:

$logged_in_user = $this->get_logged_in_user();

$wpdb->update(
‘users’,
array(
‘password’ => sha1($_POST[‘new_password’])
),
array(
‘id’ => (int) $logged_in_user[‘id’]
),
array( ‘%s’ ),
array( ‘%d’ )
);