This happens when the wrong passcode has been entered 10 times. The stages escalate from a 1-minute lock after 5 incorrect attempts, to a 60-minute lock after 9 incorrect attempts. After the 10th incorrect attempt, depending on the setting under Settings → Passcode, either the iPhone gets wiped, or you get the message you describe.
Since your friend is worried about losing all her photos with a wipe, it's safe to assume she did not have iCloud Backup enabled, or that she was running iOS 4? Because if she does have a backup in iCloud, you could simply wipe the phone and restore it.
According to OS X Daily, you need to plug the phone into iTunes on the computer it was previously synced with. Then you should be able to
Sync it by entering the correct passcode directly into iTunes. This will trigger a new backup, after which you'll be able to
Restore her iPhone from this backup.
If this doesn't work for you, then the only way to regain access to that iPhone is to wipe it. Because the contents of the phone are encrypted, not even Apple can recover the data for you.