Skip to content

Commit

Permalink
[stable10] Backport of Make email field as default to create user
Browse files Browse the repository at this point in the history
Make email field as default to create user.
Previously we had username, password. With
this change it becomes username, email. This
would help admins to create users with email
address.

Signed-off-by: Sujith H <sharidasan@owncloud.com>
  • Loading branch information
sharidas committed Aug 27, 2018
1 parent 4e9d627 commit 3fc13bc
Show file tree
Hide file tree
Showing 17 changed files with 572 additions and 53 deletions.
28 changes: 28 additions & 0 deletions lib/public/InvalidUserTokenException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php
/**
* @author Sujith Haridasan <sharidasan@owncloud.com>
*
* @copyright Copyright (c) 2018, ownCloud GmbH
* @license AGPL-3.0
*
* This code is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License, version 3,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License, version 3,
* along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/

namespace OCP;

class InvalidUserTokenException extends UserTokenException {
public function __construct($message = "", $code = 0) {
parent::__construct($message, $code, $this);
}
}
28 changes: 28 additions & 0 deletions lib/public/UserTokenException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php
/**
* @author Sujith Haridasan <sharidasan@owncloud.com>
*
* @copyright Copyright (c) 2018, ownCloud GmbH
* @license AGPL-3.0
*
* This code is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License, version 3,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License, version 3,
* along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/

namespace OCP;

class UserTokenException extends \Exception {
public function __construct($message = "", $code, \Exception $previous = null) {
parent::__construct($message, $code, $previous);
}
}
28 changes: 28 additions & 0 deletions lib/public/UserTokenExpiredException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php
/**
* @author Sujith Haridasan <sharidasan@owncloud.com>
*
* @copyright Copyright (c) 2018, ownCloud GmbH
* @license AGPL-3.0
*
* This code is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License, version 3,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License, version 3,
* along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/

namespace OCP;

class UserTokenExpiredException extends UserTokenException {
public function __construct($message = "", $code = 0) {
parent::__construct($message, $code, $this);
}
}
28 changes: 28 additions & 0 deletions lib/public/UserTokenMismatchException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php
/**
* @author Sujith Haridasan <sharidasan@owncloud.com>
*
* @copyright Copyright (c) 2018, ownCloud GmbH
* @license AGPL-3.0
*
* This code is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License, version 3,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License, version 3,
* along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/

namespace OCP;

class UserTokenMismatchException extends UserTokenException {
public function __construct($message = "", $code = 0) {
parent::__construct($message, $code, $this);
}
}
3 changes: 2 additions & 1 deletion settings/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,8 @@ public function __construct(array $urlParams=[]) {
$c->query('DefaultMailAddress'),
$c->query('URLGenerator'),
$c->query('OCP\\App\\IAppManager'),
$c->query('OCP\\IAvatarManager')
$c->query('OCP\\IAvatarManager'),
$c->query('ServerContainer')->getEventDispatcher()
);
});
$container->registerService('LogSettingsController', function (IContainer $c) {
Expand Down
Loading

0 comments on commit 3fc13bc

Please sign in to comment.