New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0009562: Add new account functions #164

Merged
merged 14 commits into from Nov 19, 2017

Conversation

Projects
7 participants
@emre1702
Contributor

emre1702 commented Nov 5, 2017

Added getAccountIP & getAccountsByIP.
Added getAccountsByData.
Added setAccountName.

string getAccountIP ( account theAccount )
table getAccountsByIP ( string theIP )
table getAccountsByData ( string dataName, string value )
boolean setAccountName ( account theAccount, string newName[, bool allowCaseVariations = false] )

Bugtracker: https://bugs.mtasa.com/view.php?id=9562

Also with setAccountName this code will get useless:
https://wiki.multitheftauto.com/wiki/SetAccountName

@emre1702 emre1702 changed the title from Add getAccountIP & getAccountsByIP to (#9562) Add new account functions Nov 6, 2017

emre1702 added some commits Nov 6, 2017

fixed wrong index usage
row[0] instead of row[1]
@emre1702

This comment has been minimized.

Show comment
Hide comment
@emre1702

emre1702 Nov 6, 2017

Contributor

Ok, that's it.

Contributor

emre1702 commented Nov 6, 2017

Ok, that's it.

@CrosRoad95

This comment has been minimized.

Show comment
Hide comment
@CrosRoad95

CrosRoad95 Nov 6, 2017

Contributor

add option to save accounts in mysql :)

Contributor

CrosRoad95 commented Nov 6, 2017

add option to save accounts in mysql :)

@qaisjp

This comment has been minimized.

Show comment
Hide comment
@qaisjp

qaisjp Nov 9, 2017

Member

Hi @emre1702,

To prevent this from happening, you need to make a branch for each pull request you'd like to create.

To fix your branch, run these commands in the command line:

git checkout master
git reset ef3b7167e011c6 --hard
git config --global pull.rebase true
git push --force

Let me know if you have any problems.

Member

qaisjp commented Nov 9, 2017

Hi @emre1702,

To prevent this from happening, you need to make a branch for each pull request you'd like to create.

To fix your branch, run these commands in the command line:

git checkout master
git reset ef3b7167e011c6 --hard
git config --global pull.rebase true
git push --force

Let me know if you have any problems.

@emre1702

This comment has been minimized.

Show comment
Hide comment
@emre1702

emre1702 Nov 9, 2017

Contributor

Thx, worked.
Learned pull requests after this request, this was my first.
The other ones worked without problems 😆
Got no problems anymore ^^

Contributor

emre1702 commented Nov 9, 2017

Thx, worked.
Learned pull requests after this request, this was my first.
The other ones worked without problems 😆
Got no problems anymore ^^

Return false instead of NULL, when player with same name (case-insens…
…itive) already exists and setAccountName doesn't work
@emre1702

This comment has been minimized.

Show comment
Hide comment
@emre1702

emre1702 Nov 10, 2017

Contributor

@qaisjp Right, sry.
Copied from AddAccount, but here a null makes no sense.

Contributor

emre1702 commented Nov 10, 2017

@qaisjp Right, sry.
Copied from AddAccount, but here a null makes no sense.

@ccw808

This comment has been minimized.

Show comment
Hide comment
@ccw808

ccw808 Nov 10, 2017

Member

What is the reason for adding account ID access?

Member

ccw808 commented Nov 10, 2017

What is the reason for adding account ID access?

@Dezash

This comment has been minimized.

Show comment
Hide comment
@Dezash

Dezash Nov 10, 2017

Contributor

@ccw808 it is an easy way to reference accounts on systems that cannot handle certain characters. You do not need to make any conversions this way.

Contributor

Dezash commented Nov 10, 2017

@ccw808 it is an easy way to reference accounts on systems that cannot handle certain characters. You do not need to make any conversions this way.

@ccw808

This comment has been minimized.

Show comment
Hide comment
@ccw808

ccw808 Nov 15, 2017

Member

I am concerned about exposing sqlite generated row ids. Please split the account ID access stuff into separate pull request.

Member

ccw808 commented Nov 15, 2017

I am concerned about exposing sqlite generated row ids. Please split the account ID access stuff into separate pull request.

@emre1702

This comment has been minimized.

Show comment
Hide comment
@emre1702

emre1702 Nov 15, 2017

Contributor

@ccw808 Done

Contributor

emre1702 commented Nov 15, 2017

@ccw808 Done

@ccw808

This comment has been minimized.

Show comment
Hide comment
@ccw808

ccw808 Nov 15, 2017

Member

Thanks.
Please change the curly brace style so it is consistent with the existing code.

Member

ccw808 commented Nov 15, 2017

Thanks.
Please change the curly brace style so it is consistent with the existing code.

@emre1702

This comment has been minimized.

Show comment
Hide comment
@emre1702

emre1702 Nov 15, 2017

Contributor

@ccw808 Done

Contributor

emre1702 commented Nov 15, 2017

@ccw808 Done

@ccw808

This comment has been minimized.

Show comment
Hide comment
@ccw808

ccw808 Nov 17, 2017

Member

CStaticFunctionDefinitions::SetAccountName and CLuaAccountDefs::SetAccountName need curly brace changes

Member

ccw808 commented Nov 17, 2017

CStaticFunctionDefinitions::SetAccountName and CLuaAccountDefs::SetAccountName need curly brace changes

@emre1702

This comment has been minimized.

Show comment
Hide comment
@emre1702

emre1702 Nov 17, 2017

Contributor

Oh sry, forgot setAccoutName.
Fixed @ccw808

Contributor

emre1702 commented Nov 17, 2017

Oh sry, forgot setAccoutName.
Fixed @ccw808

@ccw808 ccw808 merged commit 12a0c11 into multitheftauto:master Nov 19, 2017

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@ccw808

This comment has been minimized.

Show comment
Hide comment
@ccw808

ccw808 Nov 19, 2017

Member

Thanks

Member

ccw808 commented Nov 19, 2017

Thanks

@patrikjuvonen patrikjuvonen added this to In progress in release/v1.5.6 via automation Aug 7, 2018

@patrikjuvonen patrikjuvonen added this to the 1.5.6 milestone Aug 7, 2018

@patrikjuvonen patrikjuvonen moved this from In progress to Done in release/v1.5.6 Aug 7, 2018

@patrikjuvonen patrikjuvonen changed the title from (#9562) Add new account functions to 0009562: Add new account functions Sep 4, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment