mirror of
https://github.com/friendica/friendica
synced 2025-04-25 13:10:11 +00:00
Replace x() by isset(), !empty() or defaults()
- Remove extraneous parentheses around empty() calls - Remove duplicate calls to intval(), count() or strlen() after empty() - Replace ternary operators outputting binary value with empty() return value - Rewrite defaults() without x()
This commit is contained in:
parent
ea4e772b1e
commit
458981f75c
101 changed files with 896 additions and 914 deletions
|
@ -412,12 +412,12 @@ class User
|
|||
$password = !empty($data['password']) ? trim($data['password']) : '';
|
||||
$password1 = !empty($data['password1']) ? trim($data['password1']) : '';
|
||||
$confirm = !empty($data['confirm']) ? trim($data['confirm']) : '';
|
||||
$blocked = !empty($data['blocked']) ? intval($data['blocked']) : 0;
|
||||
$verified = !empty($data['verified']) ? intval($data['verified']) : 0;
|
||||
$blocked = !empty($data['blocked']);
|
||||
$verified = !empty($data['verified']);
|
||||
$language = !empty($data['language']) ? Strings::escapeTags(trim($data['language'])) : 'en';
|
||||
|
||||
$publish = !empty($data['profile_publish_reg']) && intval($data['profile_publish_reg']) ? 1 : 0;
|
||||
$netpublish = strlen(Config::get('system', 'directory')) ? $publish : 0;
|
||||
$publish = !empty($data['profile_publish_reg']);
|
||||
$netpublish = $publish && Config::get('system', 'directory');
|
||||
|
||||
if ($password1 != $confirm) {
|
||||
throw new Exception(L10n::t('Passwords do not match. Password unchanged.'));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue