Unverified Commit 700bf9c3 authored by Viral Solani's avatar Viral Solani Committed by GitHub

Merge pull request #93 from viralsolani/analysis-qJ77eE

Apply fixes from StyleCI
parents e8205936 be0ebd29
...@@ -97,7 +97,6 @@ class UserController extends Controller ...@@ -97,7 +97,6 @@ class UserController extends Controller
$permissions = Permission::getSelectData('display_name'); $permissions = Permission::getSelectData('display_name');
$userPermissions = $user->permissions()->get()->pluck('id')->toArray(); $userPermissions = $user->permissions()->get()->pluck('id')->toArray();
return view('backend.access.users.edit')->with([ return view('backend.access.users.edit')->with([
'user' => $user, 'user' => $user,
'userRoles' => $user->roles->pluck('id')->all(), 'userRoles' => $user->roles->pluck('id')->all(),
......
...@@ -33,7 +33,7 @@ class StoreUserRequest extends Request ...@@ -33,7 +33,7 @@ class StoreUserRequest extends Request
'email' => ['required', 'email', 'max:255', Rule::unique('users')], 'email' => ['required', 'email', 'max:255', Rule::unique('users')],
'password' => 'required|min:6|confirmed', 'password' => 'required|min:6|confirmed',
'assignees_roles' => 'required', 'assignees_roles' => 'required',
'permissions'=> 'required', 'permissions' => 'required',
]; ];
} }
...@@ -45,7 +45,7 @@ class StoreUserRequest extends Request ...@@ -45,7 +45,7 @@ class StoreUserRequest extends Request
public function messages() public function messages()
{ {
return [ return [
'assignees_roles' => 'Please Select Role' 'assignees_roles' => 'Please Select Role',
]; ];
} }
} }
...@@ -30,7 +30,7 @@ class UpdateUserRequest extends Request ...@@ -30,7 +30,7 @@ class UpdateUserRequest extends Request
'email' => 'required|email', 'email' => 'required|email',
'first_name' => 'required', 'first_name' => 'required',
'last_name' => 'required', 'last_name' => 'required',
'permissions'=> 'required', 'permissions' => 'required',
'assignees_roles' => 'required', 'assignees_roles' => 'required',
]; ];
} }
...@@ -43,7 +43,7 @@ class UpdateUserRequest extends Request ...@@ -43,7 +43,7 @@ class UpdateUserRequest extends Request
public function messages() public function messages()
{ {
return [ return [
'assignees_roles' => 'Please Select Role' 'assignees_roles' => 'Please Select Role',
]; ];
} }
} }
...@@ -2,21 +2,21 @@ ...@@ -2,21 +2,21 @@
namespace App\Repositories\Backend\Access\User; namespace App\Repositories\Backend\Access\User;
use App\Models\Access\User\User;
use Illuminate\Support\Facades\DB;
use App\Exceptions\GeneralException;
use App\Repositories\BaseRepository;
use Illuminate\Support\Facades\Hash;
use App\Events\Backend\Access\User\UserCreated; use App\Events\Backend\Access\User\UserCreated;
use App\Events\Backend\Access\User\UserDeleted;
use App\Events\Backend\Access\User\UserUpdated;
use App\Events\Backend\Access\User\UserRestored;
use App\Events\Backend\Access\User\UserDeactivated; use App\Events\Backend\Access\User\UserDeactivated;
use App\Events\Backend\Access\User\UserReactivated; use App\Events\Backend\Access\User\UserDeleted;
use App\Events\Backend\Access\User\UserPasswordChanged; use App\Events\Backend\Access\User\UserPasswordChanged;
use App\Repositories\Backend\Access\Role\RoleRepository;
use App\Events\Backend\Access\User\UserPermanentlyDeleted; use App\Events\Backend\Access\User\UserPermanentlyDeleted;
use App\Events\Backend\Access\User\UserReactivated;
use App\Events\Backend\Access\User\UserRestored;
use App\Events\Backend\Access\User\UserUpdated;
use App\Exceptions\GeneralException;
use App\Models\Access\User\User;
use App\Notifications\Frontend\Auth\UserNeedsConfirmation; use App\Notifications\Frontend\Auth\UserNeedsConfirmation;
use App\Repositories\Backend\Access\Role\RoleRepository;
use App\Repositories\BaseRepository;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Hash;
/** /**
* Class UserRepository. * Class UserRepository.
...@@ -113,7 +113,6 @@ class UserRepository extends BaseRepository ...@@ -113,7 +113,6 @@ class UserRepository extends BaseRepository
// Attach New Permissions // Attach New Permissions
$user->attachPermissions($permissions); $user->attachPermissions($permissions);
//Send confirmation email if requested and account approval is off //Send confirmation email if requested and account approval is off
if (isset($data['confirmation_email']) && $user->confirmed == 0) { if (isset($data['confirmation_email']) && $user->confirmed == 0) {
$user->notify(new UserNeedsConfirmation($user->confirmation_code)); $user->notify(new UserNeedsConfirmation($user->confirmation_code));
...@@ -125,8 +124,6 @@ class UserRepository extends BaseRepository ...@@ -125,8 +124,6 @@ class UserRepository extends BaseRepository
$email_type = 1; $email_type = 1;
}*/ }*/
// Send email to the user // Send email to the user
/* $options = [ /* $options = [
'data' => $user->toArray(), 'data' => $user->toArray(),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment