diff options
author | friendica <info@friendica.com> | 2013-09-08 16:33:30 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2013-09-08 16:33:30 -0700 |
commit | f8afdb3cba25dc7dc70ac3d7c6e48e6595bd97d5 (patch) | |
tree | 54d231b76eafef25a92dc6be8bfb0ad0215d4b95 /include/identity.php | |
parent | b88f60b51ff9416c35b5af9ce849026666c47cc8 (diff) | |
parent | b4a2361efc7bc4b49f5195a2c14573a41c55f300 (diff) | |
download | volse-hubzilla-f8afdb3cba25dc7dc70ac3d7c6e48e6595bd97d5.tar.gz volse-hubzilla-f8afdb3cba25dc7dc70ac3d7c6e48e6595bd97d5.tar.bz2 volse-hubzilla-f8afdb3cba25dc7dc70ac3d7c6e48e6595bd97d5.zip |
Merge pull request #118 from cvogeley/master
Service class checks
Diffstat (limited to 'include/identity.php')
-rw-r--r-- | include/identity.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/identity.php b/include/identity.php index 8db6355c0..98209c8ae 100644 --- a/include/identity.php +++ b/include/identity.php @@ -7,7 +7,7 @@ require_once('include/crypto.php'); function identity_check_service_class($account_id) { $ret = array('success' => false, $message => ''); - $r = q("select count(channel_id) as total from channel were channel_account_id = %d ", + $r = q("select count(channel_id) as total from channel where channel_account_id = %d ", intval($account_id) ); if(! ($r && count($r))) { @@ -80,7 +80,10 @@ function create_identity($arr) { $ret['message'] = t('No account identifier'); return $ret; } - + $ret=identity_check_service_class($arr['account_id']); + if (!$ret['success']) { + return $ret; + } $nick = mb_strtolower(trim($arr['nickname'])); $name = escape_tags($arr['name']); $pageflags = ((x($arr,'pageflags')) ? intval($arr['pageflags']) : PAGE_NORMAL); |