@@ -11,9 +11,7 @@ |
||
| 11 | 11 | |
| 12 | 12 | namespace Icybee\Modules\Users; |
| 13 | 13 | |
| 14 | -use ICanBoogie\I18n; |
|
| 15 | 14 | use ICanBoogie\Operation; |
| 16 | - |
|
| 17 | 15 | use Brickrouge\Button; |
| 18 | 16 | use Brickrouge\Element; |
| 19 | 17 | use Brickrouge\Form; |
@@ -81,7 +81,7 @@ |
||
| 81 | 81 | |
| 82 | 82 | Element::CHILDREN => [ |
| 83 | 83 | |
| 84 | - new Button('logout', [ 'type' => 'submit' ]) |
|
| 84 | + new Button('logout', ['type' => 'submit']) |
|
| 85 | 85 | |
| 86 | 86 | ] |
| 87 | 87 | |
@@ -12,8 +12,6 @@ |
||
| 12 | 12 | namespace Icybee\Modules\Users; |
| 13 | 13 | |
| 14 | 14 | use ICanBoogie\DateTime; |
| 15 | -use ICanBoogie\ActiveRecord; |
|
| 16 | - |
|
| 17 | 15 | use Icybee\ConstructorModel; |
| 18 | 16 | |
| 19 | 17 | class UserModel extends ConstructorModel |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | continue; |
| 74 | 74 | } |
| 75 | 75 | |
| 76 | - $has_many_roles->execute('INSERT {self} SET uid = ?, rid = ?', [ $rc, $rid ]); |
|
| 76 | + $has_many_roles->execute('INSERT {self} SET uid = ?, rid = ?', [$rc, $rid]); |
|
| 77 | 77 | } |
| 78 | 78 | } |
| 79 | 79 | |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | |
| 89 | 89 | foreach ($restricted_sites as $site_id) |
| 90 | 90 | { |
| 91 | - $has_many_sites->execute('INSERT {self} SET uid = ?, site_id = ?', [ $rc, $site_id ]); |
|
| 91 | + $has_many_sites->execute('INSERT {self} SET uid = ?, site_id = ?', [$rc, $site_id]); |
|
| 92 | 92 | } |
| 93 | 93 | } |
| 94 | 94 | } |
@@ -9,7 +9,7 @@ |
||
| 9 | 9 | |
| 10 | 10 | return [ |
| 11 | 11 | |
| 12 | - ICanBoogie\HTTP\AuthenticationRequired::class .'::rescue' => $hooks . 'on_security_exception_rescue', |
|
| 12 | + ICanBoogie\HTTP\AuthenticationRequired::class . '::rescue' => $hooks . 'on_security_exception_rescue', |
|
| 13 | 13 | ICanBoogie\HTTP\PermissionRequired::class . '::rescue' => $hooks . 'on_security_exception_rescue', |
| 14 | 14 | ICanBoogie\Routing\RouteDispatcher::class . '::dispatch:before' => $hooks . 'before_routing_dispatcher_dispatch', |
| 15 | 15 | Icybee\Modules\Users\Roles\Operation\DeleteOperation::class . '::process:before' => $hooks . 'before_roles_delete', |
@@ -11,8 +11,8 @@ |
||
| 11 | 11 | |
| 12 | 12 | 'patron.markups' => [ |
| 13 | 13 | |
| 14 | - 'user' => [ $hooks . 'markup_user' ], |
|
| 15 | - 'users:form:login' => [ $hooks . 'markup_form_login' ] |
|
| 14 | + 'user' => [$hooks . 'markup_user'], |
|
| 15 | + 'users:form:login' => [$hooks . 'markup_form_login'] |
|
| 16 | 16 | |
| 17 | 17 | ] |
| 18 | 18 | |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | |
| 26 | 26 | 'pattern' => '/api/logout', |
| 27 | 27 | 'controller' => LogoutOperation::class, |
| 28 | - 'via' => [ 'GET', 'POST' ] |
|
| 28 | + 'via' => ['GET', 'POST'] |
|
| 29 | 29 | |
| 30 | 30 | ], |
| 31 | 31 | |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | ] + Make::admin('users', Routing\UsersAdminController::class, [ |
| 59 | 59 | |
| 60 | 60 | 'id_name' => 'uid', |
| 61 | - 'only' => [ 'index', 'new', 'edit', 'confirm-delete', 'profile', 'authenticate' ], |
|
| 61 | + 'only' => ['index', 'new', 'edit', 'confirm-delete', 'profile', 'authenticate'], |
|
| 62 | 62 | 'actions' => [ |
| 63 | 63 | |
| 64 | 64 | 'profile' => [ |
@@ -17,19 +17,19 @@ discard block |
||
| 17 | 17 | Model::SCHEMA => [ |
| 18 | 18 | |
| 19 | 19 | 'uid' => 'serial', |
| 20 | - 'constructor' => [ 'varchar', 64, 'indexed' => true ], |
|
| 21 | - 'email' => [ 'varchar', 64, 'unique' => true ], |
|
| 22 | - 'password_hash' => [ 'varchar', 255, 'charset' => 'ascii/bin' ], |
|
| 23 | - 'username' => [ 'varchar', 32, 'unique' => true ], |
|
| 24 | - 'firstname' => [ 'varchar', 32 ], |
|
| 25 | - 'lastname' => [ 'varchar', 32 ], |
|
| 26 | - 'nickname' => [ 'varchar', 32 ], |
|
| 27 | - 'name_as' => [ 'integer', 'tiny' ], |
|
| 28 | - 'language' => [ 'varchar', 8 ], |
|
| 29 | - 'timezone' => [ 'varchar', 32 ], |
|
| 20 | + 'constructor' => ['varchar', 64, 'indexed' => true], |
|
| 21 | + 'email' => ['varchar', 64, 'unique' => true], |
|
| 22 | + 'password_hash' => ['varchar', 255, 'charset' => 'ascii/bin'], |
|
| 23 | + 'username' => ['varchar', 32, 'unique' => true], |
|
| 24 | + 'firstname' => ['varchar', 32], |
|
| 25 | + 'lastname' => ['varchar', 32], |
|
| 26 | + 'nickname' => ['varchar', 32], |
|
| 27 | + 'name_as' => ['integer', 'tiny'], |
|
| 28 | + 'language' => ['varchar', 8], |
|
| 29 | + 'timezone' => ['varchar', 32], |
|
| 30 | 30 | 'logged_at' => 'datetime', |
| 31 | - 'created_at' => [ 'timestamp', 'default' => 'CURRENT_TIMESTAMP' ], |
|
| 32 | - 'is_activated' => [ 'boolean', 'indexed' => true ] |
|
| 31 | + 'created_at' => ['timestamp', 'default' => 'CURRENT_TIMESTAMP'], |
|
| 32 | + 'is_activated' => ['boolean', 'indexed' => true] |
|
| 33 | 33 | |
| 34 | 34 | ] |
| 35 | 35 | ], |
@@ -41,8 +41,8 @@ discard block |
||
| 41 | 41 | Model::CLASSNAME => 'ICanBoogie\ActiveRecord\Model', |
| 42 | 42 | Model::SCHEMA => [ |
| 43 | 43 | |
| 44 | - 'uid' => [ 'foreign', 'primary' => true ], |
|
| 45 | - 'rid' => [ 'foreign', 'primary' => true ] |
|
| 44 | + 'uid' => ['foreign', 'primary' => true], |
|
| 45 | + 'rid' => ['foreign', 'primary' => true] |
|
| 46 | 46 | |
| 47 | 47 | ] |
| 48 | 48 | ], |
@@ -54,8 +54,8 @@ discard block |
||
| 54 | 54 | Model::CLASSNAME => 'ICanBoogie\ActiveRecord\Model', |
| 55 | 55 | Model::SCHEMA => [ |
| 56 | 56 | |
| 57 | - 'uid' => [ 'foreign', 'primary' => true ], |
|
| 58 | - 'site_id' => [ 'foreign', 'primary' => true ] |
|
| 57 | + 'uid' => ['foreign', 'primary' => true], |
|
| 58 | + 'site_id' => ['foreign', 'primary' => true] |
|
| 59 | 59 | |
| 60 | 60 | ] |
| 61 | 61 | ] |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | ], |
| 70 | 70 | |
| 71 | 71 | Descriptor::REQUIRED => true, |
| 72 | - Descriptor::REQUIRES => [ 'users.roles' ], |
|
| 72 | + Descriptor::REQUIRES => ['users.roles'], |
|
| 73 | 73 | Descriptor::TITLE => "Users" |
| 74 | 74 | |
| 75 | 75 | ]; |
@@ -21,7 +21,7 @@ |
||
| 21 | 21 | |
| 22 | 22 | /* @var $site \Icybee\Modules\Sites\Site */ |
| 23 | 23 | $site = $app->site; |
| 24 | - $ws_title = \ICanBoogie\escape($site->admin_title ? $site->admin_title : $site->title .':' . $site->language); |
|
| 24 | + $ws_title = \ICanBoogie\escape($site->admin_title ? $site->admin_title : $site->title . ':' . $site->language); |
|
| 25 | 25 | |
| 26 | 26 | $available = $site->model |
| 27 | 27 | ->where('site_id IN(' . implode(',', $app->user->restricted_sites_ids) . ')') |
@@ -76,6 +76,6 @@ |
||
| 76 | 76 | please select another website to work with:</p> |
| 77 | 77 | $form |
| 78 | 78 | </div> |
| 79 | -EOT; |
|
| 79 | +eot; |
|
| 80 | 80 | } |
| 81 | 81 | } |
@@ -65,8 +65,8 @@ discard block |
||
| 65 | 65 | |
| 66 | 66 | Element::GROUPS => [ |
| 67 | 67 | |
| 68 | - 'connection' => [ 'title' => 'Connection' ], |
|
| 69 | - 'advanced' => [ 'title' => 'Advanced' ] |
|
| 68 | + 'connection' => ['title' => 'Connection'], |
|
| 69 | + 'advanced' => ['title' => 'Advanced'] |
|
| 70 | 70 | |
| 71 | 71 | ] |
| 72 | 72 | |
@@ -172,7 +172,7 @@ discard block |
||
| 172 | 172 | Group::LABEL => 'language', |
| 173 | 173 | Element::GROUP => 'advanced', |
| 174 | 174 | Element::DESCRIPTION => 'language', |
| 175 | - Element::OPTIONS => [ null => '' ] + $languages |
|
| 175 | + Element::OPTIONS => [null => ''] + $languages |
|
| 176 | 176 | |
| 177 | 177 | ]), |
| 178 | 178 | |
@@ -214,7 +214,7 @@ discard block |
||
| 214 | 214 | return null; |
| 215 | 215 | } |
| 216 | 216 | |
| 217 | - $rid = [ 2 => true ]; |
|
| 217 | + $rid = [2 => true]; |
|
| 218 | 218 | |
| 219 | 219 | if ($uid) |
| 220 | 220 | { |
@@ -236,7 +236,7 @@ discard block |
||
| 236 | 236 | Form::LABEL => 'roles', |
| 237 | 237 | Element::GROUP => 'advanced', |
| 238 | 238 | Element::OPTIONS => $options, |
| 239 | - Element::OPTIONS_DISABLED => [ 2 => true ], |
|
| 239 | + Element::OPTIONS_DISABLED => [2 => true], |
|
| 240 | 240 | Element::REQUIRED => true, |
| 241 | 241 | Element::DESCRIPTION => 'roles', |
| 242 | 242 | |
@@ -255,7 +255,7 @@ discard block |
||
| 255 | 255 | { |
| 256 | 256 | $values = $this->values; |
| 257 | 257 | |
| 258 | - $options = [ '<username>' ]; |
|
| 258 | + $options = ['<username>']; |
|
| 259 | 259 | |
| 260 | 260 | if ($values[User::USERNAME]) |
| 261 | 261 | { |
@@ -12,14 +12,11 @@ |
||
| 12 | 12 | namespace Icybee\Modules\Users\Block; |
| 13 | 13 | |
| 14 | 14 | use Brickrouge\Group; |
| 15 | - |
|
| 16 | - |
|
| 17 | 15 | use Brickrouge\Document; |
| 18 | 16 | use Brickrouge\Element; |
| 19 | 17 | use Brickrouge\Form; |
| 20 | 18 | use Brickrouge\Text; |
| 21 | 19 | use Brickrouge\Widget; |
| 22 | - |
|
| 23 | 20 | use Icybee\Modules\Users\Module; |
| 24 | 21 | use Icybee\Modules\Users\Roles\Binding\UserBindings; |
| 25 | 22 | use Icybee\Modules\Users\User; |
@@ -30,8 +30,8 @@ |
||
| 30 | 30 | { |
| 31 | 31 | parent::__construct($module, $attributes + [ |
| 32 | 32 | |
| 33 | - self::T_COLUMNS_ORDER => [ User::USERNAME, User::IS_ACTIVATED, User::EMAIL, 'roles', User::CREATED_AT, User::LOGGED_AT ], |
|
| 34 | - self::T_ORDER_BY => [ 'created_at', 'desc' ] |
|
| 33 | + self::T_COLUMNS_ORDER => [User::USERNAME, User::IS_ACTIVATED, User::EMAIL, 'roles', User::CREATED_AT, User::LOGGED_AT], |
|
| 34 | + self::T_ORDER_BY => ['created_at', 'desc'] |
|
| 35 | 35 | |
| 36 | 36 | ]); |
| 37 | 37 | } |