Skip to content

Commit

Permalink
Minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
MioVisman committed Oct 10, 2023
1 parent 427e679 commit 9cfd336
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
21 changes: 9 additions & 12 deletions app/Controllers/Routing.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,25 +97,22 @@ public function routing(): Page
}

// OAuth
if (
$user->isAdmin
|| 1 === $config->b_oauth_allow
) {
$r->add(
$r::GET,
'/reglog/callback/{name}',
'RegLog:callback',
'RegLogCallback'
);
}

if (1 === $config->b_oauth_allow) {
$r->add(
$r::PST,
'/reglog/redirect/{type}',
'RegLog:redirect',
'RegLogRedirect'
);

if ($user->isAdmin) {
$r->add(
$r::GET,
'/reglog/callback/{name}',
'RegLog:callback',
'RegLogCallback'
);
}
}

// просмотр разрешен
Expand Down
2 changes: 1 addition & 1 deletion app/Models/Pages/Auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ protected function formLogin(string $username, bool $save, string $redirect): ar
/**
* Проверка пользователя по базе
*/
public function vLoginCheck(Validator $v, #[SensitiveParameter] string $password ): string
public function vLoginCheck(Validator $v, #[SensitiveParameter] string $password): string
{
if (empty($v->getErrors())) {
if ($this->loginWithForm) {
Expand Down

0 comments on commit 9cfd336

Please sign in to comment.