-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
49bd25f
commit 1f9e98c
Showing
3 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
protected/humhub/modules/user/migrations/m240523_081438_fix_null_password.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
|
||
use humhub\modules\user\models\Password; | ||
use yii\db\Expression; | ||
use yii\db\Migration; | ||
|
||
/** | ||
* Class m240523_081438_fix_null_password | ||
*/ | ||
class m240523_081438_fix_null_password extends Migration | ||
{ | ||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function safeUp() | ||
{ | ||
Password::deleteAll(['OR', | ||
['IS', 'algorithm', new Expression('NULL')], | ||
['IS', 'password', new Expression('NULL')]]); | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function safeDown() | ||
{ | ||
echo "m240523_081438_fix_null_password cannot be reverted.\n"; | ||
|
||
return false; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters