Enable users public profile page by default when profile pages are enabled
This commit is contained in:
parent
24f2155a35
commit
c8952a8ac1
@ -6,10 +6,9 @@ use App\Facade\Theme;
|
|||||||
use App\Facade\UserConfig;
|
use App\Facade\UserConfig;
|
||||||
use App\Group;
|
use App\Group;
|
||||||
use App\Helpers\PermissionsHelper;
|
use App\Helpers\PermissionsHelper;
|
||||||
use App\User;
|
|
||||||
|
|
||||||
use App\Http\Requests;
|
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
|
use App\Http\Requests;
|
||||||
|
use App\User;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Support\Facades\App;
|
use Illuminate\Support\Facades\App;
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
@ -89,6 +88,7 @@ class UserController extends Controller
|
|||||||
$user->password = bcrypt($user->password);
|
$user->password = bcrypt($user->password);
|
||||||
$user->is_activated = true;
|
$user->is_activated = true;
|
||||||
$user->is_admin = (strtolower($request->get('is_admin')) == 'on');
|
$user->is_admin = (strtolower($request->get('is_admin')) == 'on');
|
||||||
|
$user->enable_profile_page = UserConfig::get('social_user_profiles');
|
||||||
$user->save();
|
$user->save();
|
||||||
|
|
||||||
return redirect(route('users.index'));
|
return redirect(route('users.index'));
|
||||||
|
@ -98,6 +98,7 @@ class RegisterController extends Controller
|
|||||||
|
|
||||||
$data['password'] = bcrypt($data['password']);
|
$data['password'] = bcrypt($data['password']);
|
||||||
$data['is_admin'] = false;
|
$data['is_admin'] = false;
|
||||||
|
$data['enable_profile_page'] = UserConfig::get('social_user_profiles');
|
||||||
unset($data['password_confirmation']);
|
unset($data['password_confirmation']);
|
||||||
|
|
||||||
return User::create($data);
|
return User::create($data);
|
||||||
|
@ -41,6 +41,7 @@ class InstallController extends Controller
|
|||||||
$user->password = bcrypt($request->get('password'));
|
$user->password = bcrypt($request->get('password'));
|
||||||
$user->is_admin = true;
|
$user->is_admin = true;
|
||||||
$user->is_activated = true;
|
$user->is_activated = true;
|
||||||
|
$user->enable_profile_page = true;
|
||||||
$user->save();
|
$user->save();
|
||||||
|
|
||||||
return $this->completeSetup();
|
return $this->completeSetup();
|
||||||
|
Loading…
Reference in New Issue
Block a user