diff options
author | Joshua Judson Rosen | 2017-04-17 00:53:18 -0400 |
---|---|---|
committer | Joshua Judson Rosen | 2017-04-17 00:53:18 -0400 |
commit | b15b9dd3e8c47c7dead249031089896b8c24b348 (patch) | |
tree | 732617f1829a55d0b71d775004c33bf8cda3f518 /plugins/gnusocial/BridgeGnusocial.php | |
parent | Fix #16 Accept command-line arguments. (diff) | |
download | ejabberd-auth-php-master.tar.gz |
Diffstat (limited to 'plugins/gnusocial/BridgeGnusocial.php')
-rw-r--r-- | plugins/gnusocial/BridgeGnusocial.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/plugins/gnusocial/BridgeGnusocial.php b/plugins/gnusocial/BridgeGnusocial.php new file mode 100644 index 0000000..bfac3fb --- /dev/null +++ b/plugins/gnusocial/BridgeGnusocial.php @@ -0,0 +1,14 @@ +<?php + +/** + * Implements EjabberdAuthBridge. + */ +class BridgeGnusocial extends EjabberdAuthBridge { + function isuser($username, $server) { + return Nickname::isTaken($username) != null; + } + + function auth($username, $server, $password) { + return common_check_user($username, $password) instanceof User; + } +} |