Quantcast
Channel: Joomla! Forum - community, help and support
Viewing all articles
Browse latest Browse all 2341

Joomla! 5.x Coding • Update user and undefined array key

$
0
0
Hi Folks,

When I execute the code:

Code:

$userData['groups'] = array('2');                    $userData['block'] = 0;                    $req_user->bind($userData);                    $req_user->save(true);
I get the following warning, even though the code works:

Code:

PHP Warning: Undefined array key "password2" in .../public_html/libraries/src/User/User.php on line 635
Is this an incorrect way to set the groups to specifically group 2 (remove any others) and unblock the user, or should there be an update method that only updates the values being changed?

Is this a bug?

Statistics: Posted by neo314 — Sat Feb 24, 2024 9:52 pm



Viewing all articles
Browse latest Browse all 2341

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>