Merge pull request #269 from ladybirdweb/analysis-8wWbO4
Applied fixes from StyleCI
This commit is contained in:
@@ -66,13 +66,11 @@ class OrganizationController extends Controller
|
|||||||
*
|
*
|
||||||
* @return datatable
|
* @return datatable
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public function organizationAutofill()
|
public function organizationAutofill()
|
||||||
{
|
{
|
||||||
return view('themes.default1.agent.helpdesk.organization.getautocomplete');
|
return view('themes.default1.agent.helpdesk.organization.getautocomplete');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function is used to display the list of Organizations.
|
* This function is used to display the list of Organizations.
|
||||||
*
|
*
|
||||||
|
@@ -750,31 +750,22 @@ class UserController extends Controller
|
|||||||
$org_name = Input::get('org');
|
$org_name = Input::get('org');
|
||||||
|
|
||||||
if ($org_name) {
|
if ($org_name) {
|
||||||
|
|
||||||
$org = Organization::where('name', '=', $org_name)->lists('id')->first();
|
$org = Organization::where('name', '=', $org_name)->lists('id')->first();
|
||||||
if ($org) {
|
if ($org) {
|
||||||
|
|
||||||
$user_org = new User_org();
|
$user_org = new User_org();
|
||||||
$user_org->org_id = $org;
|
$user_org->org_id = $org;
|
||||||
$user_org->user_id = $id;
|
$user_org->user_id = $id;
|
||||||
$user_org->save();
|
$user_org->save();
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
}
|
|
||||||
else{
|
|
||||||
return 2;
|
return 2;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Assigning an user to an organization.
|
* Assigning an user to an organization.
|
||||||
*
|
*
|
||||||
@@ -787,27 +778,19 @@ class UserController extends Controller
|
|||||||
$org_name = Input::get('org');
|
$org_name = Input::get('org');
|
||||||
|
|
||||||
if ($org_name) {
|
if ($org_name) {
|
||||||
|
|
||||||
$org = Organization::where('name', '=', $org_name)->lists('id')->first();
|
$org = Organization::where('name', '=', $org_name)->lists('id')->first();
|
||||||
if ($org) {
|
if ($org) {
|
||||||
|
|
||||||
$user_org = User_org::where('user_id', '=', $id)->first();
|
$user_org = User_org::where('user_id', '=', $id)->first();
|
||||||
$user_org->org_id = $org;
|
$user_org->org_id = $org;
|
||||||
$user_org->user_id = $id;
|
$user_org->user_id = $id;
|
||||||
$user_org->save();
|
$user_org->save();
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
}
|
|
||||||
else{
|
|
||||||
return 2;
|
return 2;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user