Quantcast
Channel: General developer forum
Viewing all articles
Browse latest Browse all 37675

don't understand this evaluation

$
0
0
by Danny Wahl.  

I'm rewriting the renderer for login_info() for a theme but there's one conditional that doesn't make sense to me (I mean I think I understand what it's doing - but I don't know why we're doing that...)

outputrenderers.php #L589

if (is_mnet_remote_user($USER) and $idprovider = $DB->get_record('mnet_host', array('id'=>$USER->mnethostid))) { ... }

What I don't understand is the second part.  Shouldn't $idprovider ALWAYS be instantiated?  It might be the DB record, it might be an error, it might be NULL - but it will always exist, so what's the point, and what's it doing?


Viewing all articles
Browse latest Browse all 37675

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>