|
"I am a beginner, and thanks to CodeIgniter Shield, I am developing easily. I have added user columns to the user table and created a model that inherits from ShieldUserModel. The registration and login functions are working well, as follows: php <?php
declare(strict_types=1);
namespace App\Models;
use CodeIgniter\Shield\Models\UserModel as ShieldUserModel;
class UserModel extends ShieldUserModel
{
protected function initialize(): void
{
parent::initialize();
// Processing when fields are added to the users table
$this->allowedFields = [
...$this->allowedFields,
'phone_number',
'authname',
];
}
}What I want to achieve is that when I call From what I have found on forums and Google searches, is extending Shield Entities the only way to do this? Do you have a simple example?" |
Answered by
kenjis
Sep 22, 2023
Replies: 1 comment 2 replies
|
Can't you use |
2 replies
Answer selected by
yuyake
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Can't you use
$user->phone_numbernow?