Reputation: 7233
i am using following query to fetch records
$qb = $EM->createQueryBuilder();
$PostDataSets = $qb->select('user','follower')->from('WebService\Entity\User', 'user')
->innerJoin('WebService\Entity\Follower','follower', $qb->expr()->eq('user.id', 'follower.following_id'))
->where($qb->expr()->like('user.username', $qb->expr()->literal('%' . 'admin' . '%')))
->getQuery()
->getResult();
Now when i loop through the result set i get following error
foreach ($PostDataSets as $i => $PostDataSet) {
$postDataArray[$i]['id'] = $PostDataSet->getId();
$postDataArray[$i]['user_id'] = $PostDataSet->getId();
$postDataArray[$i]['username'] = $PostDataSet->getUserName();
$postDataArray[$i]['full_name'] = $PostDataSet->getFullName();
$postDataArray[$i]['photo'] = $PostDataSet->getPhoto();
$postDataArray[$i]['created_at'] = $PostDataSet->getCreatedAt();
$postDataArray[$i]['updated_at'] = $PostDataSet->getUpdatedAt();
}
this is the error i get
Fatal error: Call to undefined method WebService\Entity\Follower::getUserName() in R:\xampp\htdocs\myapp\module\WebService\src\WebService\Controller\PostController.php on line 142
But if i change my query to following i dont get any error.
$qb = $EM->createQueryBuilder();
$PostDataSets = $qb->select('user')->from('WebService\Entity\User', 'user')
->innerJoin('WebService\Entity\Follower','follower', $qb->expr()->eq('user.id', 'follower.following_id'))
->where($qb->expr()->like('user.username', $qb->expr()->literal('%' . 'admin' . '%')))
->getQuery()
->getResult();
Can any 1 explain reason for the error?
EDIT This is the dump
object(stdClass)#365 (34) { ["__CLASS__"]=> string(22) "WebService\Entity\User" ["id"]=> int(1) ["Country"]=> NULL ["Posts"]=> array(17) { [0]=> string(22) "WebService\Entity\Post" [1]=> string(22) "WebService\Entity\Post" [2]=> string(22) "WebService\Entity\Post" [3]=> string(22) "WebService\Entity\Post" [4]=> string(22) "WebService\Entity\Post" [5]=> string(22) "WebService\Entity\Post" [6]=> string(22) "WebService\Entity\Post" [7]=> string(22) "WebService\Entity\Post" [8]=> string(22) "WebService\Entity\Post" [9]=> string(22) "WebService\Entity\Post" [10]=> string(22) "WebService\Entity\Post" [11]=> string(22) "WebService\Entity\Post" [12]=> string(22) "WebService\Entity\Post" [13]=> string(22) "WebService\Entity\Post" [14]=> string(22) "WebService\Entity\Post" [15]=> string(22) "WebService\Entity\Post" [16]=> string(22) "WebService\Entity\Post" } ["FollowingUsers"]=> array(4) { [0]=> string(26) "WebService\Entity\Follower" [1]=> string(26) "WebService\Entity\Follower" [2]=> string(26) "WebService\Entity\Follower" [3]=> string(26) "WebService\Entity\Follower" } ["FollowerUsers"]=> array(4) { [0]=> string(26) "WebService\Entity\Follower" [1]=> string(26) "WebService\Entity\Follower" [2]=> string(26) "WebService\Entity\Follower" [3]=> string(26) "WebService\Entity\Follower" } ["PostLikes"]=> array(0) { } ["CommentLikes"]=> array(0) { } ["Comments"]=> array(1) { [0]=> string(25) "WebService\Entity\Comment" } ["username"]=> string(5) "admin" ["password"]=> string(60) "$2y$10$WxVcjXy3ond8dyYKz3VeQuv155pLWcNYoSti5hSB31oEHhWjWI3DC" ["email"]=> string(21) "[email protected]" ["fname"]=> NULL ["lname"]=> NULL ["full_name"]=> string(15) "Muhammad Rashid" ["dname"]=> NULL ["dob"]=> object(stdClass)#850 (3) { ["__CLASS__"]=> string(8) "DateTime" ["date"]=> string(25) "1983-06-08T00:00:00+02:00" ["timezone"]=> string(13) "Europe/Berlin" } ["gender"]=> NULL ["relationship"]=> NULL ["interested_in"]=> NULL ["photo"]=> NULL ["cover_photo"]=> NULL ["state"]=> NULL ["city"]=> NULL ["address"]=> NULL ["current_location"]=> NULL ["cell"]=> NULL ["phone"]=> NULL ["about_me"]=> NULL ["remember_me"]=> NULL ["salt"]=> string(24) "WxVcjXy3ond8dyYKz3VeQw==" ["created_at"]=> object(stdClass)#851 (3) { ["__CLASS__"]=> string(8) "DateTime" ["date"]=> string(25) "2014-12-20T13:31:33+01:00" ["timezone"]=> string(13) "Europe/Berlin" } ["updated_at"]=> NULL ["deleted_at"]=> NULL } object(stdClass)#365 (7) { ["__CLASS__"]=> string(26) "WebService\Entity\Follower" ["id"]=> int(1) ["FollowingUser"]=> object(stdClass)#660 (34) { ["__CLASS__"]=> string(22) "WebService\Entity\User" ["id"]=> int(1) ["Country"]=> NULL ["Posts"]=> string(9) "Array(17)" ["FollowingUsers"]=> string(8) "Array(4)" ["FollowerUsers"]=> string(8) "Array(4)" ["PostLikes"]=> string(8) "Array(0)" ["CommentLikes"]=> string(8) "Array(0)" ["Comments"]=> string(8) "Array(1)" ["username"]=> string(5) "admin" ["password"]=> string(60) "$2y$10$WxVcjXy3ond8dyYKz3VeQuv155pLWcNYoSti5hSB31oEHhWjWI3DC" ["email"]=> string(21) "[email protected]" ["fname"]=> NULL ["lname"]=> NULL ["full_name"]=> string(15) "Muhammad Rashid" ["dname"]=> NULL ["dob"]=> string(8) "DateTime" ["gender"]=> NULL ["relationship"]=> NULL ["interested_in"]=> NULL ["photo"]=> NULL ["cover_photo"]=> NULL ["state"]=> NULL ["city"]=> NULL ["address"]=> NULL ["current_location"]=> NULL ["cell"]=> NULL ["phone"]=> NULL ["about_me"]=> NULL ["remember_me"]=> NULL ["salt"]=> string(24) "WxVcjXy3ond8dyYKz3VeQw==" ["created_at"]=> string(8) "DateTime" ["updated_at"]=> NULL ["deleted_at"]=> NULL } ["FollowerUser"]=> object(stdClass)#864 (34) { ["__CLASS__"]=> string(22) "WebService\Entity\User" ["id"]=> int(1) ["Country"]=> NULL ["Posts"]=> string(9) "Array(17)" ["FollowingUsers"]=> string(8) "Array(4)" ["FollowerUsers"]=> string(8) "Array(4)" ["PostLikes"]=> string(8) "Array(0)" ["CommentLikes"]=> string(8) "Array(0)" ["Comments"]=> string(8) "Array(1)" ["username"]=> string(5) "admin" ["password"]=> string(60) "$2y$10$WxVcjXy3ond8dyYKz3VeQuv155pLWcNYoSti5hSB31oEHhWjWI3DC" ["email"]=> string(21) "[email protected]" ["fname"]=> NULL ["lname"]=> NULL ["full_name"]=> string(15) "Muhammad Rashid" ["dname"]=> NULL ["dob"]=> string(8) "DateTime" ["gender"]=> NULL ["relationship"]=> NULL ["interested_in"]=> NULL ["photo"]=> NULL ["cover_photo"]=> NULL ["state"]=> NULL ["city"]=> NULL ["address"]=> NULL ["current_location"]=> NULL ["cell"]=> NULL ["phone"]=> NULL ["about_me"]=> NULL ["remember_me"]=> NULL ["salt"]=> string(24) "WxVcjXy3ond8dyYKz3VeQw==" ["created_at"]=> string(8) "DateTime" ["updated_at"]=> NULL ["deleted_at"]=> NULL } ["are_we_following"]=> int(1) ["created_at"]=> NULL ["updated_at"]=> NULL }
Fatal error: Call to undefined method WebService\Entity\Follower::getUserName() in R:\xampp\htdocs\kanvas-php\module\WebService\src\WebService\Controller\PostController.php on line 144
<?php
namespace WebService\Entity;
use Doctrine\ORM\Mapping as ORM;
use WebService\Entity\Post;
use WebService\Entity\User;
use Doctrine\Common\Collections\ArrayCollection;
use DoctrineModule\Stdlib\Hydrator\DoctrineObject as DoctrineHydrator;
/**
* An Follower entity.
*
* @ORM\Entity
* @ORM\Table(name="followers")
*
* @property int $id
* @property User $FollowingUser
* @property User $FollowerUser
* @property smallint $are_we_following
* @property datetime $created_at
* @property datetime $updated_at
*
*/
class Follower extends EntityHydrator {
/**
* @ORM\Id
* @ORM\Column(type="integer",length=11);
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
/**
* This is the user who will be followed
* @ORM\ManyToOne(targetEntity="User", inversedBy="FollowingUsers")
* @ORM\JoinColumn(name="following_id", referencedColumnName="id", nullable=false)
*
*/
protected $FollowingUser;
/**
* This is the user who is going to follow
* @ORM\ManyToOne(targetEntity="User", inversedBy="FollowerUsers")
* @ORM\JoinColumn(name="follower_id", referencedColumnName="id", nullable=false)
*
*/
protected $FollowerUser;
/**
* This column shows that are we also following the user
* @ORM\Column(type="smallint", length=1, nullable=true, options={"default"=0})
*
*/
protected $are_we_following;
/**
* @ORM\Column(type="datetime", nullable=true)
*
*/
protected $created_at;
/**
* @ORM\Column(type="datetime", nullable=true)
*
*/
protected $updated_at;
public function __construct(array $data = null) {
parent::__construct($data, $this, true);
}
public function getId() {
return $this->id;
}
public function getFollowingUser() {
return $this->FollowingUser;
}
public function getFollowerUser() {
return $this->FollowerUser;
}
public function getAreWeFollowing() {
return $this->are_we_following;
}
public function getCreatedAt() {
return $this->created_at;
}
public function getUpdatedAt() {
return $this->updated_at;
}
public function setId($id) {
$this->id = $id;
}
public function setFollowingUser($FollowingUser) {
$this->FollowingUser = $FollowingUser;
}
public function setFollowerUser($FollowerUser) {
$this->FollowerUser = $FollowerUser;
}
public function setAreWeFollowing($are_we_following) {
$this->are_we_following = $are_we_following;
}
public function setCreatedAt($created_at) {
$this->created_at = $created_at;
}
public function setUpdatedAt($updated_at) {
$this->updated_at = $updated_at;
}
}
Users Entity
<?php
namespace WebService\Entity;
use Doctrine\ORM\Mapping as ORM;
use \WebService\Entity\Country;
use Doctrine\Common\Collections\ArrayCollection;
/**
* An User entity.
*
* @ORM\Entity
* @ORM\Table(name="users", uniqueConstraints={@ORM\UniqueConstraint(name="username", columns={"username"}), @ORM\UniqueConstraint(name="email", columns={"email"})})
*
* @property int $id
* @property Country $Country
* @property ArrayCollection $Posts
* @property ArrayCollection $Comments
* @property ArrayCollection $CommentLikes
* @property ArrayCollection $FollowingUsers
* @property ArrayCollection $FollowerUsers
* @property string $username
* @property string $password
* @property string $email
* @property string $fname
* @property string $lname
* @property string $dname
* @property string $dob
* @property string $gender
* @property string $relationship
* @property string $interested_in
* @property string $photo
* @property string $cover_photo
* @property string $country_id
* @property string $state
* @property string $city
* @property string $address
* @property string $current_location
* @property string $cell
* @property string $phone
* @property string $about_me
* @property string $remember_me
* @property string $salt
* @property datetime $created_at
* @property datetime $updated_at
* @property datetime $deleted_at
*
*/
class User extends EntityHydrator{
const SALT = 'ACK3HtAz[|U8]Of9@?Ppj:!';
const SALT_LENGTH = 16;
/**
* @ORM\Id
* @ORM\Column(type="integer",length=11);
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
/**
* @ORM\ManyToOne(targetEntity="Country", inversedBy="Users")
* @ORM\JoinColumn(name="country_id", referencedColumnName="id", nullable=true)
*
*/
protected $Country;
/**
* @ORM\OneToMany(targetEntity="Post", mappedBy="User", orphanRemoval=true, cascade={"persist"})
*
*/
protected $Posts;
/**
* @ORM\OneToMany(targetEntity="Follower", mappedBy="FollowingUser", orphanRemoval=true, cascade={"persist"})
*
*/
protected $FollowingUsers;
/**
* @ORM\OneToMany(targetEntity="Follower", mappedBy="FollowerUser", orphanRemoval=true, cascade={"persist"})
*
*/
protected $FollowerUsers;
/**
* @ORM\OneToMany(targetEntity="PostLike", mappedBy="User", orphanRemoval=true, cascade={"persist"})
*
*/
protected $PostLikes;
/**
* @ORM\OneToMany(targetEntity="CommentLike", mappedBy="User", orphanRemoval=true, cascade={"persist"})
*
*/
protected $CommentLikes;
/**
* @ORM\OneToMany(targetEntity="Comment", mappedBy="User", orphanRemoval=true, cascade={"persist"})
*
*/
protected $Comments;
/**
* @ORM\Column(type="string", length=50, nullable=false)
*
*/
protected $username;
/**
* @ORM\Column(type="string", length=255, nullable=false)
*
*/
protected $password;
/**
* @ORM\Column(type="string", length=60, nullable=false)
*
*/
protected $email;
/**
* @ORM\Column(type="string", length=60, nullable=true)
*
*/
protected $fname;
/**
* @ORM\Column(type="string", length=60, nullable=true)
*
*/
protected $lname;
/**
* @ORM\Column(type="string", length=120, nullable=false)
*
*/
protected $full_name;
/**
* @ORM\Column(type="string", length=60, nullable=true)
*
*/
protected $dname;
/**
* @ORM\Column(type="datetime", nullable=true)
*
*/
protected $dob;
/**
* @ORM\Column(type="string", columnDefinition="ENUM('Male','Female', 'Do not wish to disclose')", nullable=true)
*
*/
protected $gender;
/**
* @ORM\Column(type="string", columnDefinition="ENUM('Married','Single', 'Complicated','Divorced','Seperated','Engaged')", nullable=true)
*
*/
protected $relationship;
/**
* @ORM\Column(type="string", columnDefinition="ENUM('Male','Female', 'Both')", nullable=true)
*
*/
protected $interested_in;
/**
* @ORM\Column(type="string",length=1024, nullable=true)
*
*/
protected $photo;
/**
* @ORM\Column(type="string",length=1024, nullable=true)
*
*/
protected $cover_photo;
/**
* @ORM\Column(type="string",length=60, nullable=true)
*
*/
protected $state;
/**
* @ORM\Column(type="string",length=60, nullable=true)
*
*/
protected $city;
/**
* @ORM\Column(type="string",length=255, nullable=true)
*
*/
protected $address;
/**
* @ORM\Column(type="string",length=255, nullable=true)
*
*/
protected $current_location;
/**
* @ORM\Column(type="string",length=20, nullable=true)
*
*/
protected $cell;
/**
* @ORM\Column(type="string",length=20, nullable=true)
*
*/
protected $phone;
/**
* @ORM\Column(type="string",length=255, nullable=true)
*
*/
protected $about_me;
/**
* @ORM\Column(type="smallint", length=1, nullable=true, options={"default"=0})
*
*/
protected $remember_me;
/**
* @ORM\Column(type="string", length=100, nullable=false)
*
*/
protected $salt;
/**
* @ORM\Column(type="datetime", nullable=true)
*
*/
protected $created_at;
/**
* @ORM\Column(type="datetime", nullable=true)
*
*/
protected $updated_at;
/**
* @ORM\Column(type="datetime", nullable=true)
*
*/
protected $deleted_at;
public function __construct(array $data = null)
{
parent::__construct($data, $this, true);
}
public function getId() {
return $this->id;
}
public function setId($id) {
$this->id = $id;
return $this;
}
public function getUsername() {
return $this->username;
}
public function setUsername($username) {
$this->username = $username;
return $this;
}
public function getPassword() {
return $this->password;
}
public function setPassword($password) {
$Bcrypt = new \Zend\Crypt\Password\Bcrypt();
if (empty($this->salt)) {
$this->setSalt();
}
$Bcrypt->setSalt(base64_decode($this->salt));
$hashedPassword = $Bcrypt->create($password);
$this->password = $hashedPassword;
// $this->password = $password;
}
public function getSalt() {
return $this->salt;
}
public function setSalt($salt = null) {
if (empty($salt)) {
$salt = \Zend\Math\Rand::getBytes(self::SALT_LENGTH, $strong = false);
$encrytSalt = base64_encode($salt);
} else {
$encrytSalt = $salt;
}
$this->salt = $encrytSalt;
return $this;
}
/**
* @return mixed
*/
public function getComments()
{
return $this->Comments;
}
/**
* @param mixed $Comments
*/
public function setComments($Comments)
{
$this->Comments = $Comments;
}
/**
* @return mixed
*/
public function getCountry()
{
return $this->Country;
}
/**
* @param mixed $Country
*/
public function setCountry($Country)
{
$this->Country = $Country;
}
/**
* @return mixed
*/
public function getPosts()
{
return $this->Posts;
}
/**
* @param mixed $Posts
*/
public function setPosts($Posts)
{
$this->Posts = $Posts;
}
/**
* @return mixed
*/
public function getAboutMe()
{
return $this->about_me;
}
/**
* @param mixed $about_me
*/
public function setAboutMe($about_me)
{
$this->about_me = $about_me;
}
/**
* @return mixed
*/
public function getAddress()
{
return $this->address;
}
/**
* @param mixed $address
*/
public function setAddress($address)
{
$this->address = $address;
}
/**
* @return mixed
*/
public function getCell()
{
return $this->cell;
}
/**
* @param mixed $cell
*/
public function setCell($cell)
{
$this->cell = $cell;
}
/**
* @return mixed
*/
public function getCity()
{
return $this->city;
}
/**
* @param mixed $city
*/
public function setCity($city)
{
$this->city = $city;
}
/**
* @return mixed
*/
public function getCountryId()
{
return $this->country_id;
}
/**
* @param mixed $country_id
*/
public function setCountryId($country_id)
{
$this->country_id = $country_id;
}
/**
* @return mixed
*/
public function getCoverPhoto()
{
return $this->cover_photo;
}
/**
* @param mixed $cover_photo
*/
public function setCoverPhoto($cover_photo)
{
$this->cover_photo = $cover_photo;
}
/**
* @return mixed
*/
public function getCreatedAt()
{
return $this->created_at;
}
/**
* @param mixed $created_at
*/
public function setCreatedAt($created_at)
{
$this->created_at = $created_at;
}
/**
* @return mixed
*/
public function getCurrentLocation()
{
return $this->current_location;
}
/**
* @param mixed $current_location
*/
public function setCurrentLocation($current_location)
{
$this->current_location = $current_location;
}
/**
* @return mixed
*/
public function getDeletedAt()
{
return $this->deleted_at;
}
/**
* @param mixed $deleted_at
*/
public function setDeletedAt($deleted_at)
{
$this->deleted_at = $deleted_at;
}
/**
* @return mixed
*/
public function getDname()
{
return $this->dname;
}
/**
* @param mixed $dname
*/
public function setDname($dname)
{
$this->dname = $dname;
}
/**
* @return mixed
*/
public function getDob()
{
return $this->dob;
}
/**
* @param mixed $dob
*/
public function setDob($dob)
{
$this->dob = $dob;
}
/**
* @return mixed
*/
public function getEmail()
{
return $this->email;
}
/**
* @param mixed $email
*/
public function setEmail($email)
{
$this->email = $email;
}
/**
* @return mixed
*/
public function getFname()
{
return $this->fname;
}
/**
* @param mixed $fname
*/
public function setFname($fname)
{
$this->fname = $fname;
}
/**
* @return mixed
*/
public function getFullName()
{
return $this->full_name;
}
/**
* @param mixed $full_name
*/
public function setFullName($full_name)
{
$this->full_name = $full_name;
}
/**
* @return mixed
*/
public function getGender()
{
return $this->gender;
}
/**
* @param mixed $gender
*/
public function setGender($gender)
{
$this->gender = $gender;
}
/**
* @return mixed
*/
public function getInterestedIn()
{
return $this->interested_in;
}
/**
* @param mixed $interested_in
*/
public function setInterestedIn($interested_in)
{
$this->interested_in = $interested_in;
}
/**
* @return mixed
*/
public function getLname()
{
return $this->lname;
}
/**
* @param mixed $lname
*/
public function setLname($lname)
{
$this->lname = $lname;
}
/**
* @return mixed
*/
public function getPhone()
{
return $this->phone;
}
/**
* @param mixed $phone
*/
public function setPhone($phone)
{
$this->phone = $phone;
}
/**
* @return mixed
*/
public function getPhoto()
{
return $this->photo;
}
/**
* @param mixed $photo
*/
public function setPhoto($photo)
{
$this->photo = $photo;
}
/**
* @return mixed
*/
public function getRelationship()
{
return $this->relationship;
}
/**
* @param mixed $relationship
*/
public function setRelationship($relationship)
{
$this->relationship = $relationship;
}
/**
* @return mixed
*/
public function getRememberMe()
{
return $this->remember_me;
}
/**
* @param mixed $remember_me
*/
public function setRememberMe($remember_me)
{
$this->remember_me = $remember_me;
}
/**
* @return mixed
*/
public function getState()
{
return $this->state;
}
/**
* @param mixed $state
*/
public function setState($state)
{
$this->state = $state;
}
/**
* @return mixed
*/
public function getUpdatedAt()
{
return $this->updated_at;
}
/**
* @param mixed $updated_at
*/
public function setUpdatedAt($updated_at)
{
$this->updated_at = $updated_at;
}
//============================================================================
public static function verifyHashedPassword(\WebService\Entity\User $User, $passwordGiven) {
$Bcrypt = new \Zend\Crypt\Password\Bcrypt();
$Bcrypt->setSalt(base64_decode($User->getSalt()));
return $Bcrypt->verify($passwordGiven, $User->getPassword());
}
public static function makeHashedPassword(\WebService\Entity\User $User, $passwordGiven)
{
//@todo makeHashedPassword Definition
return '';
}
}
Upvotes: 1
Views: 73
Reputation: 2069
I'm not 100% sure about this answer, but let's see:
1.) The problem
As you can read here:
A SELECT query can contain joins. There are 2 types of JOINs: “Regular” Joins and “Fetch” Joins.
Regular Joins: Used to limit the results and/or compute aggregate values.
Fetch Joins: In addition to the uses of regular joins: Used to fetch related entities and include them in the hydrated result of a query.
There is no special DQL keyword that distinguishes a regular join from a fetch join. A join (be it an inner or outer join) becomes a “fetch join” as soon as fields of the joined entity appear in the SELECT part of the DQL query outside of an aggregate function. Otherwise its a “regular join”.
So basically your first query uses a fetch join and your second query (which is working) uses a regular join.
Now, why is the regular join working and the fetch join is not? The regular join fetches the user entity and you can call the getUserName method as expected. The follower relationship is more or less ignored, because in a regular join it would only be used for filtering the results.
The fetch join variant (and here we get to the part I'm not really sure about) has to fetch the user and the follower entity, as they are both passed to the select
method. But the follower entity is the owning side of the relationship (the relationship is stored within the follower entity), so the query returns follower entities instead of user entities and you would have to get the User entity by calling some getUser
method on the follower entity.
This would also explain why the getId
method (which probably exists on both entities) does not lead to an error even though called before the getUserName
method.
2.) A possible solution:
Your query probably should look like this:
$EM->createQueryBuilder();
$followers = $qb->select('follower', 'user')
->from('WebService\Entity\Follower', 'follower')
->join('follower.FollowingUser', 'user')
->where($qb->expr()->like('user.username', $qb->expr()->literal('%' . 'admin' . '%')))
->getQuery()
->getResult();
foreach ($followers as $follower) {
$user = $follower->getFollowingUser();
$postDataArray[$i]['id'] = $follower->getId();
$postDataArray[$i]['user_id'] = $user->getId();
$postDataArray[$i]['username'] = $user->getUserName();
$postDataArray[$i]['full_name'] = $user->getFullName();
$postDataArray[$i]['photo'] = $user->getPhoto();
$postDataArray[$i]['created_at'] = $follower->getCreatedAt();
$postDataArray[$i]['updated_at'] = $follower->getUpdatedAt();
}
This should give you all followers following a user matching %admin%
; not tested though.
Upvotes: 1