Welcome Guest, Not a member yet? Register   Sign In
CodeIgniter v4.3.8 and v4.4.0 Released!
#15

(This post was last modified: 08-28-2023, 08:50 AM by boddah85.)

After update I've got a little problem:

Call to undefined method Myth\Auth\Entities\User::getAvatar()

Im just trying to echo it in controller App\Controllers\Page

PHP Code:
echo user()->getAvatar() 


Thanks in advance for any help.

App\Entities\User

PHP Code:
<?php namespace App\Entities;

use 
Myth\Auth\Entities\User as MythUser;

class 
User extends MythUser
{
    /**
    * Default attributes.
    * @var array
    */
    protected $attributes = [
    'user_info' => ''
    ];
 
    
    
 
/**
 * getEmail address
 *
 * @return void
 */
 
public function getEmail()
    {
        return trim($this->attributes['email']);
    }
    
    
/**
    * getAvatar
    *
    * @return void
    */
    public function getAvatar()
    {        
        
/* */
    
Reply


Messages In This Thread
RE: CodeIgniter v4.3.8 and v4.4.0 Released! - by boddah85 - 08-28-2023, 08:46 AM



Theme © iAndrew 2016 - Forum software by © MyBB