Not able to use this command

HI all,
need your help to get this code running untill i enter right user
This loop is working just for one user

this is the full script

While (!$SourceUser) {
$copyfrom = Read-Host -Prompt “Copy Groups From”

Try {
    $SourceUser = Get-ADUser -Identity $copyfrom -Properties memberof
Catch {
    $copyfrom = Read-Host -Prompt "User not found.  Please enter a user to copy groups from"

$SourceUser = Get-ADUser -Identity $copyfrom -Properties memberof
$SelectedGroups = $SourceUser.memberof |
Add-ADGroupMember -Members $username -PassThru |
Select-Object -ExpandProperty Name
any other idea?

Define “right user”!

If you want to get asked if the user you just entered is the one you want to move on with you should utilize the pormpt for choice method.

Thank you all i found a solution