-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathedit_user_example.php
More file actions
executable file
·35 lines (29 loc) · 1.47 KB
/
Copy pathedit_user_example.php
File metadata and controls
executable file
·35 lines (29 loc) · 1.47 KB
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
<?php
require_once dirname(__FILE__).'/chat_room_sso_functions.php';
// Important Note:
// You also need to update the Website Toolbox chat room USERNAME on line 5 in chat_room_sso_functions.php.
// You also need to update the Website Toolbox chat room API Key on line 7 in chat_room_sso_functions.php.
// Your code to process the request to edit the details of the user on your website goes here.
// Fill in the user information in a way that the Website Toolbox chat room can understand.
$user = array();
// After successful update of user details on your website, assign the user information to $user array to update the details at the Website Toolbox chat room.
// For example: You can assign your POST/GET values to user array like below:
// $user['user'] = $_POST['user'].
// Assign email of the user, whose details have to be updated.
//$user['user'] = 'john@yahoo.com';
//Assign details needs to be set for the user.
//$user['password'] = 'john123';
$user['user'] = $_POST['user'];
$user['username'] = $_POST['newUsername'];
$user['password'] = $_POST['newPassword'];
$user['email'] = $_POST['newEmail'];
$user['avatarUrl'] = $_POST['newAvatarUrl'];
// function called for editing the user details on the Website Toolbox chat room.
// Return the status as boolean flag.
// true, if successfully done.
// false, if any error occurs.
$edit_user_status = editChatRoomUserDetails($user);
if($edit_user_status) {
// Redirect to your desired page since "edit user details" was successful.
}
?>