Changeset View
Changeset View
Standalone View
Standalone View
src/app/Observers/UserObserver.php
Show All 21 Lines | class UserObserver | ||||
* @return void | * @return void | ||||
*/ | */ | ||||
public function creating(User $user) | public function creating(User $user) | ||||
{ | { | ||||
$user->email = \strtolower($user->email); | $user->email = \strtolower($user->email); | ||||
// only users that are not imported get the benefit of the doubt. | // only users that are not imported get the benefit of the doubt. | ||||
$user->status |= User::STATUS_NEW | User::STATUS_ACTIVE; | $user->status |= User::STATUS_NEW | User::STATUS_ACTIVE; | ||||
$user->tenant_id = \config('app.tenant_id'); | |||||
} | } | ||||
/** | /** | ||||
* Handle the "created" event. | * Handle the "created" event. | ||||
* | * | ||||
* Ensures the user has at least one wallet. | * Ensures the user has at least one wallet. | ||||
* | * | ||||
* Should ensure some basic settings are available as well. | * Should ensure some basic settings are available as well. | ||||
▲ Show 20 Lines • Show All 329 Lines • Show Last 20 Lines |