33 lines
812 B
PHP
33 lines
812 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Antadis\API\Front\Models\Customer as BaseCustomer;
|
|
use Antadis\Auth\Wsse\Contracts\WsseUser;
|
|
use Illuminate\Support\Collection;
|
|
|
|
require_once _PS_ROOT_DIR_ . '/modules/privatesales_family_menu/privatesales_family_menu.php';
|
|
|
|
class User extends BaseCustomer implements WsseUser
|
|
{
|
|
/**
|
|
* @see Antadis\Auth\Wsse\Contracts\WsseUser::findByUsername()
|
|
*/
|
|
static public function findByUsername($username) {
|
|
$model = new static();
|
|
$user = $model->getByEmail($username);
|
|
if ($user) {
|
|
$model->populate($user, $user['id_customer']);
|
|
}
|
|
return $model;
|
|
}
|
|
|
|
/**
|
|
* @see Antadis\Auth\Wsse\Contracts\WsseUser::getWssePassword()
|
|
*/
|
|
public function getWssePassword() {
|
|
return $this->passwd;
|
|
}
|
|
|
|
}
|