src/Helper.php
public static function loadUserCell($mUser)
    {
        if (is_numeric($mUser)) {

            $oUserModel = Factory::model('User', 'nails/module-auth');
            $oUser      = $oUserModel->getById($mUser);

        } elseif (is_string($mUser)) {

            $oUserModel = Factory::model('User', 'nails/module-auth');
            $oUser      = $oUserModel->getByEmail($mUser);

            if (empty($oUser)) {
                $oUser = $oUserModel->getByUsername($mUser);
            }

        } else {
            $oUser = $mUser;
        }

        $aUser = [
            'id'          => !empty($oUser->id) ? $oUser->id : null,
            'profile_img' => !empty($oUser->profile_img) ? $oUser->profile_img : null,
            'gender'      => !empty($oUser->gender) ? $oUser->gender : null,
            'first_name'  => !empty($oUser->first_name) ? $oUser->first_name : null,
            'last_name'   => !empty($oUser->last_name) ? $oUser->last_name : null,
            'email'       => !empty($oUser->email) ? $oUser->email : null,
        ];

        $oView = Factory::service('View');
        return $oView->load('admin/_components/table-cell-user', $aUser, true);
    }
public static function loadUserCell($mUser)
    {
        if (is_numeric($mUser)) {

            $oUserModel = Factory::model('User', 'nails/module-auth');
            $oUser      = $oUserModel->getById($mUser);

        } elseif (is_string($mUser)) {

            $oUserModel = Factory::model('User', 'nails/module-auth');
            $oUser      = $oUserModel->getByEmail($mUser);

            if (empty($oUser)) {
                $oUser = $oUserModel->getByUsername($mUser);
            }

        } else {
            $oUser = $mUser;
        }

        $aUser = [
            'id'          => !empty($oUser->id) ? $oUser->id : null,
            'profile_img' => !empty($oUser->profile_img) ? $oUser->profile_img : null,
            'gender'      => !empty($oUser->gender) ? $oUser->gender : null,
            'first_name'  => !empty($oUser->first_name) ? $oUser->first_name : null,
            'last_name'   => !empty($oUser->last_name) ? $oUser->last_name : null,
            'email'       => !empty($oUser->email) ? $oUser->email : null,
        ];

        $oView = Factory::service('View');
        return $oView->load('admin/_components/table-cell-user', $aUser, true);
    }
Load the admin "user" table cell component

@param  mixed $mUser The user object or the User's ID/email/username

@return string
@throws \Nails\Common\Exception\FactoryException