mirror of
https://github.com/humhub/humhub.git
synced 2025-03-02 22:19:18 +01:00
Fixed user onIntegrity check + Space Indexpage validation
This commit is contained in:
parent
3a834105b9
commit
519a8e768e
@ -80,7 +80,7 @@ class Space extends ContentContainerActiveRecord implements \humhub\modules\sear
|
||||
{
|
||||
$rules = [
|
||||
[['join_policy', 'visibility', 'status', 'created_by', 'updated_by', 'auto_add_new_members', 'default_content_visibility'], 'integer'],
|
||||
|
||||
[['indexUrl'], 'string'],
|
||||
[['name'], 'required'],
|
||||
[['description', 'tags', 'color'], 'string'],
|
||||
[['created_at', 'updated_at'], 'safe'],
|
||||
@ -103,7 +103,7 @@ class Space extends ContentContainerActiveRecord implements \humhub\modules\sear
|
||||
{
|
||||
$scenarios = parent::scenarios();
|
||||
|
||||
$scenarios['edit'] = ['name', 'color', 'description', 'tags','indexUrl', 'join_policy', 'visibility', 'default_content_visibility'];
|
||||
$scenarios['edit'] = ['name', 'color', 'description', 'tags', 'indexUrl', 'join_policy', 'visibility', 'default_content_visibility'];
|
||||
$scenarios['create'] = ['name', 'color', 'description', 'join_policy', 'visibility'];
|
||||
|
||||
return $scenarios;
|
||||
|
@ -6,6 +6,7 @@ use Yii;
|
||||
use humhub\modules\user\models\User;
|
||||
use humhub\modules\user\models\Password;
|
||||
use humhub\modules\user\models\Profile;
|
||||
use humhub\modules\user\models\GroupUser;
|
||||
use humhub\modules\user\models\Mentioning;
|
||||
use humhub\modules\user\models\Follow;
|
||||
|
||||
@ -50,13 +51,10 @@ class Events extends \yii\base\Object
|
||||
$integrityController = $event->sender;
|
||||
|
||||
$integrityController->showTestHeadline("User Module - Users (" . User::find()->count() . " entries)");
|
||||
foreach (User::find()->joinWith(['profile', 'group'])->all() as $user) {
|
||||
foreach (User::find()->joinWith(['profile'])->all() as $user) {
|
||||
if ($user->profile == null) {
|
||||
$integrityController->showWarning("User with id " . $user->id . " has no profile record!");
|
||||
}
|
||||
if (!$user->hasGroup()) {
|
||||
$integrityController->showWarning("User with id " . $user->id . " has no group assignment!");
|
||||
}
|
||||
}
|
||||
|
||||
foreach (GroupUser::find()->joinWith(['user'])->all() as $groupUser) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user