mirror of
https://github.com/openvk/openvk
synced 2024-11-11 01:19:53 +03:00
Admin: Add password changer for user and password generator
localization coming soon (i hope @lumaeris will do this 4 me)
This commit is contained in:
parent
ef7b4b6c3e
commit
2018131934
2 changed files with 13 additions and 0 deletions
|
@ -86,6 +86,9 @@ final class AdminPresenter extends OpenVKPresenter
|
||||||
$query = "INSERT INTO `ChandlerACLRelations` (`user`, `group`) VALUES ('" . $user->getChandlerGUID() . "', '" . $this->postParam("add-to-group") . "')";
|
$query = "INSERT INTO `ChandlerACLRelations` (`user`, `group`) VALUES ('" . $user->getChandlerGUID() . "', '" . $this->postParam("add-to-group") . "')";
|
||||||
DatabaseConnection::i()->getConnection()->query($query);
|
DatabaseConnection::i()->getConnection()->query($query);
|
||||||
}
|
}
|
||||||
|
if($this->postParam("password")) {
|
||||||
|
$user->getChandlerUser()->updatePassword($this->postParam("password"));
|
||||||
|
}
|
||||||
|
|
||||||
$user->save();
|
$user->save();
|
||||||
|
|
||||||
|
|
|
@ -69,6 +69,16 @@
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<hr/>
|
<hr/>
|
||||||
|
<div class="field-group">
|
||||||
|
<label for="email">{_password}</label>
|
||||||
|
<input class="text medium-field" type="password" id="password" name="password" value="" />
|
||||||
|
</div>
|
||||||
|
<div class="buttons-container">
|
||||||
|
<div class="buttons">
|
||||||
|
<a class="button" onclick="let pswd = Math.random().toString(27).slice(2,12); alert('Сгенерированный пароль: ' + pswd + '\n\nНе забудьте сообщить пользователю, чтобы он сменил пароль на свой!'); $('input#password').val(pswd);">Сгенерировать пароль</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<hr/>
|
||||||
<h2>{_c_groups}</h2>
|
<h2>{_c_groups}</h2>
|
||||||
<div>
|
<div>
|
||||||
<div class="field-group">
|
<div class="field-group">
|
||||||
|
|
Loading…
Reference in a new issue