| Server IP : 52.25.153.185 / Your IP : 216.73.217.21 Web Server : Apache System : Linux ip-172-26-6-158 5.10.0-45-cloud-amd64 #1 SMP Debian 5.10.259-1 (2026-07-02) x86_64 User : daemon ( 1) PHP Version : 8.1.10 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /bitnami/wordpress/wp-content/plugins/fluent-crm/app/Models/ |
Upload File : |
<?php
namespace FluentCrm\App\Models;
/**
* User Model - DB Model for WordPress Users Table
*
* Database Model
*
* @package FluentCrm\App\Models
*
* @version 1.0.0
*/
class User extends Model
{
protected $table = 'users';
protected $primaryKey = 'ID';
protected $hidden = ['user_pass', 'user_activation_key'];
protected $appends = [ 'photo'];
/**
* Accessor to get dynamic photo attribute
* @return string
*/
public function getPhotoAttribute()
{
$contact = Subscriber::where('user_id', $this->ID);
if(!empty($this->attributes['user_email'])) {
$contact->orWhere('email', $this->attributes['user_email']);
}
$contact = $contact->first();
if($contact) {
return $contact->photo;
}
if(empty($this->attributes['user_email'])) {
return '';
}
return fluentcrmGravatar($this->attributes['user_email'], $this->attributes['display_name']);
}
}