give plugins control over magic auth so one could create plugins with policy controls (like friends only, etc.) or block lists to prevent automatic authentication.
This commit is contained in:
parent
92f94a0fdc
commit
130cad8cd8
@ -60,6 +60,18 @@ function magic_init(&$a) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$arr = array(
|
||||||
|
'channel_id' => local_user(),
|
||||||
|
'xchan' => $x[0],
|
||||||
|
'destination' => $dest,
|
||||||
|
'proceed' => true
|
||||||
|
);
|
||||||
|
|
||||||
|
call_hooks('magic_auth',$arr);
|
||||||
|
$dest = $arr['destination'];
|
||||||
|
if(! $arr['proceed'])
|
||||||
|
goaway($dest);
|
||||||
|
|
||||||
if($x[0]['hubloc_url'] === z_root()) {
|
if($x[0]['hubloc_url'] === z_root()) {
|
||||||
$webbie = substr($x[0]['hubloc_addr'],0,strpos('@',$x[0]['hubloc_addr']));
|
$webbie = substr($x[0]['hubloc_addr'],0,strpos('@',$x[0]['hubloc_addr']));
|
||||||
switch($dest) {
|
switch($dest) {
|
||||||
|
Reference in New Issue
Block a user