mirror of
https://github.com/friendica/friendica
synced 2025-04-24 01:50:17 +00:00
Re enable UpdateProfile test
This commit is contained in:
parent
226f6038de
commit
6b03ee2922
3 changed files with 41 additions and 37 deletions
|
@ -39,17 +39,17 @@ class UpdateProfile extends BaseApi
|
|||
|
||||
$api_user = DI::twitterUser()->createFromUserId($uid, true)->toArray();
|
||||
|
||||
if (!empty($_POST['name'])) {
|
||||
DBA::update('profile', ['name' => $_POST['name']], ['uid' => $uid]);
|
||||
DBA::update('user', ['username' => $_POST['name']], ['uid' => $uid]);
|
||||
Contact::update(['name' => $_POST['name']], ['uid' => $uid, 'self' => 1]);
|
||||
Contact::update(['name' => $_POST['name']], ['id' => $api_user['id']]);
|
||||
if (!empty($request['name'])) {
|
||||
DBA::update('profile', ['name' => $request['name']], ['uid' => $uid]);
|
||||
DBA::update('user', ['username' => $request['name']], ['uid' => $uid]);
|
||||
Contact::update(['name' => $request['name']], ['uid' => $uid, 'self' => 1]);
|
||||
Contact::update(['name' => $request['name']], ['id' => $api_user['id']]);
|
||||
}
|
||||
|
||||
if (isset($_POST['description'])) {
|
||||
DBA::update('profile', ['about' => $_POST['description']], ['uid' => $uid]);
|
||||
Contact::update(['about' => $_POST['description']], ['uid' => $uid, 'self' => 1]);
|
||||
Contact::update(['about' => $_POST['description']], ['id' => $api_user['id']]);
|
||||
if (isset($request['description'])) {
|
||||
DBA::update('profile', ['about' => $request['description']], ['uid' => $uid]);
|
||||
Contact::update(['about' => $request['description']], ['uid' => $uid, 'self' => 1]);
|
||||
Contact::update(['about' => $request['description']], ['id' => $api_user['id']]);
|
||||
}
|
||||
|
||||
Profile::publishUpdate($uid);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue