-
Notifications
You must be signed in to change notification settings - Fork 0
/
communitylink.php
55 lines (34 loc) · 1.51 KB
/
communitylink.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?php
global $db_connection;
require_once('admin_header_lite.php');
require_once("identity.php");
require_once("copiousauth/userdata.php");
function insert_secondary_login_sync($uid,$appdir) {
$status = "executing";
$qq = "select u.username, a.password, u.email from users AS u INNER JOIN authpass as a on (u.id = a.uid) where u.id = '$uid'";
$userObject = db_query_object($qq);
$processor = "http://localhost/drupal/";
$readyin = false;
$params = '?appdir=' . $appdir . '&op=create&name=' . $userObject->username . "&mail=" . $userObject->email . "&pass=" . $userObject->password;
$status = file_get_contents( $processor . "hostedops.php" . $params);
return($status);
}
function reset_secondary_password($uid) {
global $db_select;
global $dbspecific;
global $secondaryDB;
global $db_prefix;
global $db_connection;
$qq = "select u.username, a.password, u.email from users AS u INNER JOIN authpass as a on (u.id = a.uid) where u.id = '$uid'";
$userObject = db_query_object($qq);
$db_select = mysqli_select_db($db_connection,$secondaryDB) or die (mysqli_error($db_connection));
$tables = array();
$tables[] = "users";
$pass = md5($userObject->password);
$qq = "update {users} set pass = '$pass' where (name = '$userObject->username') AND (mail = '$userObject->email')";
$sql = plainSql($db_prefix,$tables,$qq);
db_query_exe($sql);
$db_select = mysqli_select_db($db_connection,$dbspecific) or die (mysqli_error($db_connection));
}
////reset_secondary_password(15);
?>