Object of class Concrete\Core\User\User could not be converted to string

Permalink Browser Info Environment
Since upgrading to 9.2.1 from 9.2.0, when a user with 2FA logs in, after the initial password is entered, an error occurs:

Object of class Concrete\Core\User\User could not be converted to a string

…/src/Form/Service/Form.php211:
return '<input type="hidden"' . $nameAndID . $this->serializeMiscFields('', $miscFields) . ' value="' . $value . '" />';
}

This appears to be because a User object is passed to the form service and it's trying to push that out into a hidde form field.

Type: Ticket
Status: In Progress
jero
View Replies:
mnakalay replied on at Permalink Reply
mnakalay
Hello,
Thank you for bringing this to my attention.
As I'm away at the moment I'll only be able to take care of this on tuesday.
Sorry for the inconvenience.

I'll keep you posted here as soon as it's fixed.
mnakalay replied on at Permalink Reply
mnakalay
I uploaded version 2.1.4 which resolves the issue.

Please let me know if there's anything else.
jero replied on at Permalink Reply
jero
Thanks for the fix.

I've noticed that it seems to be necessary to reset all user's 2FA details in order for this to work. I updated the package, but attempting to login resulted in an error after entering the code:

Exception Occurred: packages/two_step_authentication/src/Overrides/Controller.php:141 Call to a member function getUserObject() on null (0) (this is from the Logs - debug is off)

I've reset my own access, and the addon is now working as expected, and I've asked the client to reset all their accounts. Fortunately, there are only a handful so it's not a big task, but you might want to look into this issue for other users.
mnakalay replied on at Permalink Reply
mnakalay
That's unexpected... thank you for letting me know.

concrete5 Environment Information

# Concrete Version
Core Version - 9.2.1
Version Installed - 9.2.1
Database Version - 20230503095900

# Hostname
host2

# Environment
production

# Database Information
Version: 5.7.42-0ubuntu0.18.04.1-log
SQL Mode: STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

# Concrete Packages
2FA - Two-Factor Login Security (2.1.3), Compac (0.9.1.1682033326), JeRo MailChimp (2.0.0), Location Map (1.2.1)

# Concrete Overrides
blocks/search/controller.php, blocks/search, authentication/concrete/two_step_authentication.php, authentication/concrete/controller.php, authentication/concrete

# Concrete Cache Settings
Block Cache - On
Overrides Cache - On
Full Page Caching - Off
Full Page Cache Lifetime - Every 6 hours (default setting).

# Server Software
Apache

# Server API
fpm-fcgi

# PHP Version
7.4.33

# PHP Extensions
bcmath, bz2, calendar, cgi-fcgi, Core, ctype, curl, date, dba, dom, enchant, exif, FFI, fileinfo, filter, ftp, gd, gettext, hash, iconv, intl, json, libxml, mbstring, mysqli, mysqlnd, openssl, pcre, PDO, pdo_mysql, Phar, posix, pspell, readline, Reflection, session, shmop, SimpleXML, soap, sockets, sodium, SPL, standard, sysvmsg, sysvsem, sysvshm, tokenizer, xml, xmlreader, xmlwriter, xsl, Zend OPcache, zip, zlib

# PHP Settings
max_execution_time - 30
log_errors_max_len - 1024
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - 60
max_input_vars - 1000
memory_limit - 512M
post_max_size - 10M
upload_max_filesize - 10M
mbstring.regex_retry_limit - 1000000
mbstring.regex_stack_limit - 100000
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
pcre.backtrack_limit - 1000000
pcre.recursion_limit - 100000
session.cache_limiter - <i>no value</i>
session.gc_maxlifetime - 7200
soap.wsdl_cache_limit - 5
unserialize_max_depth - 4096
opcache.max_accelerated_files - 5000
opcache.max_file_size - 0
opcache.max_wasted_percentage - 5

Browser User-Agent String

Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/116.0

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You may not request a refund that is not currently owned by you.