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:
friendica 2013-02-20 15:07:13 -08:00
parent 92f94a0fdc
commit 130cad8cd8

View File

@ -60,6 +60,18 @@ function magic_init(&$a) {
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()) {
$webbie = substr($x[0]['hubloc_addr'],0,strpos('@',$x[0]['hubloc_addr']));
switch($dest) {