]> git.mxchange.org Git - friendica-addons.git/commitdiff
Update function calls
authorHypolite Petovan <mrpetovan@gmail.com>
Mon, 4 Dec 2017 03:38:52 +0000 (22:38 -0500)
committerHypolite Petovan <mrpetovan@gmail.com>
Mon, 4 Dec 2017 03:38:52 +0000 (22:38 -0500)
- Add use statement
- Remove require

ldapauth/ldapauth.php

index 39be69108742791aa1fdd8e816ad02b454548eac..d01f83ef831d6b244a2123499c9f8b546e7a8c5f 100755 (executable)
  *
  * ...etc.
  */
-
-require_once('include/user.php');
-
 use Friendica\Core\Config;
+use Friendica\Model\User;
 
 function ldapauth_install()
 {
@@ -179,7 +177,7 @@ function ldap_autocreateaccount($ldap_autocreateaccount, $username, $password, $
                if (empty($results)) {
                        if (strlen($email) > 0 && strlen($name) > 0) {
                                $arr = array('username' => $name, 'nickname' => $username, 'email' => $email, 'password' => $password, 'verified' => 1);
-                               $result = create_user($arr);
+                               $result = User::create($arr);
                                if ($result['success']) {
                                        logger("ldapauth: account " . $username . " created");
                                } else {