Update User.php

changed Security::X()  to Yii::$app->getSecurity()->X()