@@ -23,39 +23,29 @@ class PersonalInfo extends \Magento\Backend\Block\Template
2323 * since his last activity. Used only if it's impossible to get such setting
2424 * from configuration.
2525 */
26- const DEFAULT_ONLINE_MINUTES_INTERVAL = 15 ;
26+ public const DEFAULT_ONLINE_MINUTES_INTERVAL = 15 ;
2727
2828 /**
29- * Customer
30- *
3129 * @var \Magento\Customer\Api\Data\CustomerInterface
3230 */
3331 protected $ customer ;
3432
3533 /**
36- * Customer log
37- *
3834 * @var \Magento\Customer\Model\Log
3935 */
4036 protected $ customerLog ;
4137
4238 /**
43- * Customer logger
44- *
4539 * @var \Magento\Customer\Model\Logger
4640 */
4741 protected $ customerLogger ;
4842
4943 /**
50- * Customer registry
51- *
5244 * @var \Magento\Customer\Model\CustomerRegistry
5345 */
5446 protected $ customerRegistry ;
5547
5648 /**
57- * Account management
58- *
5949 * @var AccountManagementInterface
6050 */
6151 protected $ accountManagement ;
@@ -68,43 +58,31 @@ class PersonalInfo extends \Magento\Backend\Block\Template
6858 protected $ groupRepository ;
6959
7060 /**
71- * Customer data factory
72- *
7361 * @var \Magento\Customer\Api\Data\CustomerInterfaceFactory
7462 */
7563 protected $ customerDataFactory ;
7664
7765 /**
78- * Address helper
79- *
8066 * @var \Magento\Customer\Helper\Address
8167 */
8268 protected $ addressHelper ;
8369
8470 /**
85- * Date time
86- *
8771 * @var \Magento\Framework\Stdlib\DateTime
8872 */
8973 protected $ dateTime ;
9074
9175 /**
92- * Core registry
93- *
9476 * @var \Magento\Framework\Registry
9577 */
9678 protected $ coreRegistry ;
9779
9880 /**
99- * Address mapper
100- *
10181 * @var Mapper
10282 */
10383 protected $ addressMapper ;
10484
10585 /**
106- * Data object helper
107- *
10886 * @var \Magento\Framework\Api\DataObjectHelper
10987 */
11088 protected $ dataObjectHelper ;
@@ -439,7 +417,8 @@ public function getLastLoginDate()
439417 */
440418 public function getStoreLastLoginDate ()
441419 {
442- $ date = strtotime ($ this ->getCustomerLog ()->getLastLoginAt ());
420+ $ lastLogin = $ this ->getCustomerLog ()->getLastLoginAt ();
421+ $ date = $ lastLogin !== null ? strtotime ($ lastLogin ) : false ;
443422
444423 if ($ date ) {
445424 $ date = $ this ->_localeDate ->scopeDate ($ this ->getCustomer ()->getStoreId (), $ date , true );
0 commit comments