mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2024-11-25 00:43:44 +00:00
Update function calls
- Add use statement - Remove require
This commit is contained in:
parent
51e43d6dca
commit
780481528d
1 changed files with 2 additions and 4 deletions
|
@ -52,10 +52,8 @@
|
||||||
*
|
*
|
||||||
* ...etc.
|
* ...etc.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once('include/user.php');
|
|
||||||
|
|
||||||
use Friendica\Core\Config;
|
use Friendica\Core\Config;
|
||||||
|
use Friendica\Model\User;
|
||||||
|
|
||||||
function ldapauth_install()
|
function ldapauth_install()
|
||||||
{
|
{
|
||||||
|
@ -179,7 +177,7 @@ function ldap_autocreateaccount($ldap_autocreateaccount, $username, $password, $
|
||||||
if (empty($results)) {
|
if (empty($results)) {
|
||||||
if (strlen($email) > 0 && strlen($name) > 0) {
|
if (strlen($email) > 0 && strlen($name) > 0) {
|
||||||
$arr = array('username' => $name, 'nickname' => $username, 'email' => $email, 'password' => $password, 'verified' => 1);
|
$arr = array('username' => $name, 'nickname' => $username, 'email' => $email, 'password' => $password, 'verified' => 1);
|
||||||
$result = create_user($arr);
|
$result = User::create($arr);
|
||||||
if ($result['success']) {
|
if ($result['success']) {
|
||||||
logger("ldapauth: account " . $username . " created");
|
logger("ldapauth: account " . $username . " created");
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue