Merge branch 'multiple-mails' into develop

This commit is contained in:
Patrick Georgi
2011-03-03 14:12:03 +01:00
12 changed files with 258 additions and 48 deletions

View File

@@ -325,14 +325,12 @@ class IDF_Scm_Git extends IDF_Scm
if (!preg_match('/<(.*)>/', $author, $match)) {
return null;
}
foreach (array('email', 'login') as $what) {
$sql = new Pluf_SQL($what.'=%s', array($match[1]));
$users = Pluf::factory('Pluf_User')->getList(array('filter'=>$sql->gen()));
if ($users->count() > 0) {
return $users[0];
}
$sql = new Pluf_SQL('login=%s', array($match[1]));
$users = Pluf::factory('Pluf_User')->getList(array('filter'=>$sql->gen()));
if ($users->count() > 0) {
return $users[0];
}
return null;
return Pluf::factory('IDF_EmailAddress')->get_user_for_email_address($match[1]);
}
public static function getAnonymousAccessUrl($project, $commit=null)