mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-19 16:03:14 +00:00
fix #755 Add possibility to warn user when creating a new account in admin interface
This commit is contained in:
@@ -166,7 +166,9 @@ class Manage extends \Alchemy\Phrasea\Helper\Helper
|
||||
$count = count($row);
|
||||
|
||||
if ( ! is_array($row) || $count == 0) {
|
||||
$created_user = \User_Adapter::create($appbox, $email, \random::generatePassword(16), $email, false, false, true);
|
||||
$warn = !! $this->request->get('warn_user', false);
|
||||
|
||||
$created_user = \User_Adapter::create($appbox, $email, \random::generatePassword(16), $email, false, false, $warn);
|
||||
$this->usr_id = $created_user->get_id();
|
||||
} else {
|
||||
$this->usr_id = $row['usr_id'];
|
||||
|
@@ -209,6 +209,10 @@
|
||||
<form>
|
||||
<label>{% trans 'Adresse email du nouvel utilisateur' %}</label>
|
||||
<input type="text" name="value" />
|
||||
<label class="checkbox" for="warn_user">
|
||||
<input type="checkbox" name="warn_user" value="1"></input>
|
||||
{% trans "inform the user that his account is created" %}
|
||||
</label>
|
||||
<img src="/skins/icons/loaderFFF.gif" class="new_user_loader" style="display:none;"/>
|
||||
</form>
|
||||
</div>
|
||||
|
@@ -88,6 +88,7 @@ $(document).ready(function(){
|
||||
data: {
|
||||
act:'CREATENEWUSER',
|
||||
value:$('input[name="value"]', container).val(),
|
||||
warn_user: $('input[name="warn_user"]', container).is(':checked') ? 1 : 0,
|
||||
template:is_template ? '1':'0'
|
||||
},
|
||||
success: function(data){
|
||||
|
Reference in New Issue
Block a user