Property | Type | Description | |
---|---|---|---|
$loginTokenRepo | Owl\Repositories\LoginTokenRepositoryInterface | ||
$mailNotifyRepo | Owl\Repositories\UserMailNotificationRepositoryInterface | ||
$userRepo | Owl\Repositories\UserRepositoryInterface |
Method | Description | |
---|---|---|
__construct ( Owl\Repositories\UserRepositoryInterface $userRepo, Owl\Repositories\LoginTokenRepositoryInterface $loginTokenRepo, Owl\Repositories\UserMailNotificationRepositoryInterface $mailNotifyRepo ) | ||
create ( array $credentials = [] ) : stdclass | Create a new user. | |
getAll ( ) : array | ||
getByEmail ( string $email ) : stdclass | Get a user by email. | |
getById ( integer $id ) : stdclass | Get a user by user id. | |
getByToken ( string $token ) : stdclass | Get a user by login token. | |
getByUsername ( string $username ) : stdclass | Get a user by username. | |
getCurrentUser ( ) : stdclass | ||
getLikeUsername ( string $username ) : stdclass | Get users by username like search. | |
getOwners ( ) : array | ||
getUser ( array $wkey ) : stdClass | Get a user by specified keys. | |
getUsersToArray ( $users ) : array | get users array | |
isOwner ( ) : boolean | ||
update ( integer $id, string $username, string $email, $role ) : stdclass | Update a user information(username, email). | |
updateToken ( integer $userId, string $token ) : boolean | Update the "remember me" token by user ID. |
public __construct ( Owl\Repositories\UserRepositoryInterface $userRepo, Owl\Repositories\LoginTokenRepositoryInterface $loginTokenRepo, Owl\Repositories\UserMailNotificationRepositoryInterface $mailNotifyRepo ) | ||
$userRepo | Owl\Repositories\UserRepositoryInterface | |
$loginTokenRepo | Owl\Repositories\LoginTokenRepositoryInterface | |
$mailNotifyRepo | Owl\Repositories\UserMailNotificationRepositoryInterface |
public getByEmail ( string $email ) : stdclass | ||
string | ||
return | stdclass |
public getByToken ( string $token ) : stdclass | ||
$token | string | |
return | stdclass | | bool |
public getByUsername ( string $username ) : stdclass | ||
$username | string | |
return | stdclass |
public getLikeUsername ( string $username ) : stdclass | ||
$username | string | |
return | stdclass |
public getUsersToArray ( $users ) : array | ||
return | array |
protected LoginTokenRepositoryInterface,Owl\Repositories $loginTokenRepo | ||
return | Owl\Repositories\LoginTokenRepositoryInterface |
protected UserMailNotificationRepositoryInterface,Owl\Repositories $mailNotifyRepo | ||
return | Owl\Repositories\UserMailNotificationRepositoryInterface |