]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/User.php
Use rawContent for Special Options to avoid a protected options() method
[friendica.git] / src / Model / User.php
index 92f50dd25cdc89e920e67c80dd0f664cf25b4e9e..c8e9a61f17339ce59a22248b08de62cbe9028cc8 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2022, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -481,13 +481,12 @@ class User
        /**
         * Returns the default group for a given user and network
         *
-        * @param int    $uid     User id
-        * @param string $network network name
+        * @param int $uid User id
         *
         * @return int group id
         * @throws Exception
         */
-       public static function getDefaultGroup($uid, $network = '')
+       public static function getDefaultGroup($uid)
        {
                $user = DBA::selectFirst('user', ['def_gid'], ['uid' => $uid]);
                if (DBA::isResult($user)) {
@@ -499,26 +498,6 @@ class User
                return $default_group;
        }
 
-
-       /**
-        * Authenticate a user with a clear text password
-        *
-        * @param mixed  $user_info
-        * @param string $password
-        * @param bool   $third_party
-        * @return int|boolean
-        * @deprecated since version 3.6
-        * @see        User::getIdFromPasswordAuthentication()
-        */
-       public static function authenticate($user_info, $password, $third_party = false)
-       {
-               try {
-                       return self::getIdFromPasswordAuthentication($user_info, $password, $third_party);
-               } catch (Exception $ex) {
-                       return false;
-               }
-       }
-
        /**
         * Authenticate a user with a clear text password
         *
@@ -911,18 +890,18 @@ class User
 
                $using_invites = DI::config()->get('system', 'invitation_only');
 
-               $invite_id  = !empty($data['invite_id'])  ? Strings::escapeTags(trim($data['invite_id']))  : '';
-               $username   = !empty($data['username'])   ? Strings::escapeTags(trim($data['username']))   : '';
-               $nickname   = !empty($data['nickname'])   ? Strings::escapeTags(trim($data['nickname']))   : '';
-               $email      = !empty($data['email'])      ? Strings::escapeTags(trim($data['email']))      : '';
-               $openid_url = !empty($data['openid_url']) ? Strings::escapeTags(trim($data['openid_url'])) : '';
-               $photo      = !empty($data['photo'])      ? Strings::escapeTags(trim($data['photo']))      : '';
-               $password   = !empty($data['password'])   ? trim($data['password'])           : '';
-               $password1  = !empty($data['password1'])  ? trim($data['password1'])          : '';
-               $confirm    = !empty($data['confirm'])    ? trim($data['confirm'])            : '';
+               $invite_id  = !empty($data['invite_id'])  ? trim($data['invite_id'])  : '';
+               $username   = !empty($data['username'])   ? trim($data['username'])   : '';
+               $nickname   = !empty($data['nickname'])   ? trim($data['nickname'])   : '';
+               $email      = !empty($data['email'])      ? trim($data['email'])      : '';
+               $openid_url = !empty($data['openid_url']) ? trim($data['openid_url']) : '';
+               $photo      = !empty($data['photo'])      ? trim($data['photo'])      : '';
+               $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']);
                $verified   = !empty($data['verified']);
-               $language   = !empty($data['language'])   ? Strings::escapeTags(trim($data['language']))   : 'en';
+               $language   = !empty($data['language'])   ? trim($data['language'])   : 'en';
 
                $netpublish = $publish = !empty($data['profile_publish_reg']);