-
"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?" |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Can't you use |
Beta Was this translation helpful? Give feedback.
Can't you use
$user->phone_number
now?