use Friendica\Module\BaseSettings;
use Friendica\Module\Security\Login;
use Friendica\Protocol\Email;
-use Friendica\Util\Strings;
use Friendica\Util\Temporal;
use Friendica\Worker\Delivery;
}
}
- $username = (!empty($_POST['username']) ? Strings::escapeTags(trim($_POST['username'])) : '');
- $email = (!empty($_POST['email']) ? Strings::escapeTags(trim($_POST['email'])) : '');
- $timezone = (!empty($_POST['timezone']) ? Strings::escapeTags(trim($_POST['timezone'])) : '');
- $language = (!empty($_POST['language']) ? Strings::escapeTags(trim($_POST['language'])) : '');
+ $username = (!empty($_POST['username']) ? trim($_POST['username']) : '');
+ $email = (!empty($_POST['email']) ? trim($_POST['email']) : '');
+ $timezone = (!empty($_POST['timezone']) ? trim($_POST['timezone']) : '');
+ $language = (!empty($_POST['language']) ? trim($_POST['language']) : '');
- $defloc = (!empty($_POST['defloc']) ? Strings::escapeTags(trim($_POST['defloc'])) : '');
- $maxreq = (!empty($_POST['maxreq']) ? intval($_POST['maxreq']) : 0);
- $expire = (!empty($_POST['expire']) ? intval($_POST['expire']) : 0);
+ $defloc = (!empty($_POST['defloc']) ? trim($_POST['defloc']) : '');
+ $maxreq = (!empty($_POST['maxreq']) ? intval($_POST['maxreq']) : 0);
+ $expire = (!empty($_POST['expire']) ? intval($_POST['expire']) : 0);
$def_gid = (!empty($_POST['group-selection']) ? intval($_POST['group-selection']) : 0);
if ($email != $user['email']) {
// check for the correct password
- if (!User::authenticate(intval(local_user()), $_POST['mpassword'])) {
+ try {
+ User::getIdFromPasswordAuthentication(local_user(), $_POST['mpassword']);
+ } catch (Exception $ex) {
$err .= DI::l10n()->t('Wrong Password.');
$email = $user['email'];
}